#t168. 英尺与英寸的转换2

英尺与英寸的转换2

Feet and Inches Conversion 2

Problem Description

Americans are used to the imperial system of measurement, and commonly express height as "so many feet and so many inches". Given an American's height as ff feet and ii inches, convert it to metres (mm) and output it.

It is known that: 11 foot = 1212 inches, and 11 inch = 2.542.54 centimetres = 0.02540.0254 metres.

Input Format

The input gives one line containing two non-negative integers ff and ii, representing the number of feet and the number of inches respectively, separated by a space.

Output Format

Output one line, the corresponding height (in metres), kept to two decimal places.

Sample Input

5 7

Sample Output

1.70

Constraints

0≤f≤100 \le f \le 10, 0≤i≤110 \le i \le 11 (the number of inches does not exceed 1111, since 12 inches make 1 foot).

Hint

  • Conversion chain: first unify into total inches, then multiply by 0.0254 to get metres. The unit is metres, not centimetres — getting the order of magnitude wrong is immediately visible in the sample.
  • Keep two decimal places.
  • Verify with the sample: 5 7 → 1.70.