#abc367b. B - Cut .0
B - Cut .0
Score : points
问题陈述
给定一个保留到小数点后三位的实数 。
在以下条件下打印实数 :
- 小数部分不能有尾随的
0
。 - 不能有不必要的尾随小数点。
以上为大语言模型 kimi 翻译,仅供参考。
Problem Statement
A real number is given to the third decimal place.
Print the real number under the following conditions.
- The decimal part must not have trailing
0
s. - There must not be an unnecessary trailing decimal point.
Constraints
- is given to the third decimal place.
Input
The input is given from Standard Input in the following format:
Output
Output the answer.
Sample Input 1
1.012
Sample Output 1
1.012
1.012
can be printed as it is.
Sample Input 2
12.340
Sample Output 2
12.34
Printing 12.340
without the trailing 0
results in 12.34
.
Sample Input 3
99.900
Sample Output 3
99.9
Printing 99.900
without the trailing 0
s results in 99.9
.
Sample Input 4
0.000
Sample Output 4
0
Printing 0.000
without trailing 0
s or an unnecessary decimal point results in 0
.