#PCBBAY0000027. Làm tròn đến một chữ số thập phân (Round to One Decimal Place)
Làm tròn đến một chữ số thập phân (Round to One Decimal Place)
Round to One Decimal Place
Version: Phuoc Hung OJ Extended
Problem Statement
Given a real number , compute Python 3 round(x, 1), rounding the stored float to one decimal place. Print the resulting float using Python’s default representation; do not force exactly one decimal digit. Binary floating-point values near halfway cases can behave differently from ideal decimal arithmetic.
Input
The only line contains a real number .
Output
Print the float returned by round(x, 1) using the default Python 3 display.
Subtasks
- Subtask 1 (100 points): .
Examples
Example 1
Input
3.14159
Output
3.1
Explanation. For input 3.14159, round(x, 1) produces 3.1. The float is printed using its default representation, without padding trailing zeros.
Example 2
Input
2.65
Output
2.6
Explanation. For input 2.65, round(x, 1) produces 2.6. The float is printed using its default representation, without padding trailing zeros.
Example 3
Input
-1.25
Output
-1.2
Explanation. For input -1.25, round(x, 1) produces -1.2. The float is printed using its default representation, without padding trailing zeros.