#abc304b. B - Subscribers
B - Subscribers
Score : points
问题描述
给定一个整数 。
根据以下指示,打印 的近似值。
- 如果 小于等于 ,直接打印 。
- 如果 在 和 (包含两端)之间,截断 的个位数并输出结果。
- 如果 在 和 (包含两端)之间,截断 的十位数及其以下的所有数字并输出结果。
- 如果 在 和 (包含两端)之间,截断 的百位数及其以下的所有数字并输出结果。
- 如果 在 和 (包含两端)之间,截断 的千位数及其以下的所有数字并输出结果。
- 如果 在 和 (包含两端)之间,截断 的万位数及其以下的所有数字并输出结果。
- 如果 在 和 (包含两端)之间,截断 的十万位数及其以下的所有数字并输出结果。
以上为通义千问 qwen-max 翻译,仅供参考。
Problem Statement
You are given an integer .
Print an approximation of according to the following instructions.
- If is less than or equal to , print as it is.
- If is between and , inclusive, truncate the ones digit of and print the result.
- If is between and , inclusive, truncate the tens digit and all digits below it of and print the result.
- If is between and , inclusive, truncate the hundreds digit and all digits below it of and print the result.
- If is between and , inclusive, truncate the thousands digit and all digits below it of and print the result.
- If is between and , inclusive, truncate the ten-thousands digit and all digits below it of and print the result.
- If is between and , inclusive, truncate the hundred-thousands digit and all digits below it of and print the result.
Constraints
- is an integer between and , inclusive.
Input
The input is given from Standard Input in the following format:
Output
Print the answer.
Sample Input 1
20230603
Sample Output 1
20200000
is between and (inclusive).
Therefore, truncate the ten-thousands digit and all digits below it, and print .
Sample Input 2
0
Sample Output 2
0
Sample Input 3
304
Sample Output 3
304
Sample Input 4
500600
Sample Output 4
500000
update @ 2024/3/10 08:33:21