102260: [AtCoder]ABC226 A - Round decimals
Memory Limit:256 MB
Time Limit:2 S
Judge Style:Text Compare
Creator:
Submit:0
Solved:0
Description
Score : $100$ points
Problem Statement
You are given a real number $X$, which is representable using at most three decimal digits, with three decimal digits.
Round $X$ to the nearest integer and print the result.
Constraints
- $0 \leq X < 100$
- $X$ is representable using at most three decimal digits.
- $X$ has three decimal digits in input.
Input
Input is given from Standard Input in the following format:
$X$
Output
Print the integer resulting from rounding $X$ to the nearest integer.
Sample Input 1
3.456
Sample Output 1
3
The digit in the first decimal place of $3.456$ is $4$, so we should round it down to $3$.
Sample Input 2
99.500
Sample Output 2
100
Sample Input 3
0.000
Sample Output 3
0
Input
题意翻译
给一个100以内的正三位小数,将其四舍五入到整数后输出。Output
分数:100分
问题描述
给你一个实数$X$,可以用最多三个小数位数表示,最多有三个小数位数。
将$X$四舍五入到最接近的整数并打印结果。
约束条件
- $0 \leq X < 100$
- $X$可以用最多三个小数位数表示。
- 输入中$X$有三个小数位数。
输入
输入从标准输入以以下格式给出:
$X$
输出
打印将$X$四舍五入到最接近的整数的结果。
样例输入1
3.456
样例输出1
3
$3.456$的第一个小数位数是$4$,所以我们应该向下取整到$3$。
样例输入2
99.500
样例输出2
100
样例输入3
0.000
样例输出3
0