当前你的浏览器版本过低,网站已在兼容模式下运行,兼容模式仅提供最小功能支持,网站样式可能显示不正常。
请尽快升级浏览器以体验网站在线编辑、在线运行等功能。

建议使用的浏览器:

谷歌Chrome 火狐Firefox Opera浏览器 微软Edge浏览器 QQ浏览器 360浏览器 傲游浏览器

2713:Tire Dimensions

题目描述
Given the tire descriptor typically found on the sidewall of a passenger or light truck tire, you will calculate the tire's overall circumference. Each line of the sample input contains an example of a tire descriptor. The following diagram illustrates some of the terminology:

The tire descriptor contains the following items of information:
  1. One or two upper case letters to specify the type of tire. For our purposes, the tire types are "P" (passenger), "LT" (light truck), and "T" (temporary spare tire).
  2. The section width (of an inflated tire) in millimeters. This number is followed by a slash.
  3. The ratio of the section height to the section width, expressed as a percentage. For example, the ratio 75 means that the section height of an inflated tire is 75% of its section width.
  4. Information about the construction of the tire (one upper-case letter), optionally preceded by the speed symbol (also one upper-case letter). In the first, second, and fourth lines of the sample output, the tire construction is specified by "R", which means "radial". In the third line, it is "D", which means "diagonal". In the second line, "R" is preceded by the optional speed symbol "H".
  5. The nominal rim diameter in inches. It is called "nominal" because it does not include the rim's flanges.

The overall circumference (the goal of your calculations) is based on the overall diameter, which is the diameter of an inflated tire at the outermost surface of the tread.
输入解释
The input will consist of one or more lines, terminated by end-of-file. Each line of the input will contain one tire descriptor, as discussed in the preceding paragraphs. All numerical quantities will be positive integers. Exactly one blank space will separate consecutive items (including the slash) on the input line.
输出解释
For each line of input, the program will produce exactly one line of output, consisting of: the input line, followed by a colon, one blank space, and the overall circumference, expressed in centimeters, rounded to the nearest integer. Note that 1 centimeter equals 10 millimeters, and 1 inch equals 2.54 centimeters.
输入样例
P 195 / 75 R 14
P 205 / 60 H R 15
T 115 / 70 D 15
LT 245 / 75 R 16
输出样例
P 195 / 75 R 14: 204
P 205 / 60 H R 15: 197
T 115 / 70 D 15: 170
LT 245 / 75 R 16: 243

该题目是Virtual Judge题目,来自 北京大学POJ

题目来源 Rocky Mountain 2005

源链接: POJ-2713

最后修改于 2020-10-29T06:40:24+00:00 由爬虫自动更新

共提交 0

通过率 --%
时间上限 内存上限
1000 65536