问题2753--Lunacy

2753: Lunacy

[命题人 : ]
时间限制 : 1.000 sec  内存限制 : 64 MB

题目描述

After several months struggling with a diet, Jack has become obsessed with the idea of weighing less. In an odd way, he finds it very comforting to think that, if he had simply had the luck to be born on a different planet, his weight could be considerably less. Of course, the planets are far out of reach, but even the Earth’s moon would yield a dramatic weight loss. Objects on the moon weight only 0.167 of their weight on Earth.

输入

Input consists of one or more lines, each containing a single floating point number denoting a weight (in pounds) on the Earth. The end of input is denoted by a negative floating point number.

输出

For each line of input data, your program should print a single line of the form Objects weighing X on Earth will weigh Y on the moon. where X is the weight from the input and Y is the corresponding weight on the moon. Both output numbers should be printed to a precision of 2 digits after the decimal point.

样例输入 Copy

100.0
12.0
0.12
120000.0
-1.0

样例输出 Copy

Objects weighing 100.00 on Earth will weigh 16.70 on the moon.
Objects weighing 12.00 on Earth will weigh 2.00 on the moon.
Objects weighing 0.12 on Earth will weigh 0.02 on the moon.
Objects weighing 120000.00 on Earth will weigh 20040.00 on the moon.

来源/分类