#PCBBAY0000001. Quan sát float với 17 chữ số sau dấu chấm (Inspect a Float with 17 Decimal Places)
Quan sát float với 17 chữ số sau dấu chấm (Inspect a Float with 17 Decimal Places)
Inspect a Float with 17 Decimal Places
Version: Phuoc Hung OJ Extended
Problem Statement
A real input is parsed as a Python 3 float. Its stored binary value may differ slightly from the ideal decimal input. Display the stored value using fixed-point notation with exactly 17 digits after the decimal point. Do not apply round() before formatting.
Input
The only line contains a real number , parsed as Python 3 float.
Output
Print one line containing with exactly 17 digits after the decimal point, including trailing zeros.
Subtasks
- Subtask 1 (100 points): ; is finite.
Examples
Example 1
Input
0.1
Output
0.10000000000000001
Explanation. The decimal value has no exact finite binary representation; formatting the stored float to 17 decimal places gives 0.10000000000000001.
Example 2
Input
0.5
Output
0.50000000000000000
Explanation. The value is exactly representable in binary; .17f pads trailing zeros to produce 0.50000000000000000.
Example 3
Input
0.3
Output
0.29999999999999999
Explanation. The stored binary approximation of is slightly below the ideal decimal value; 17-decimal formatting gives 0.29999999999999999.