#abc304b. B - Subscribers

B - Subscribers

Score : 200200 points

问题描述

给定一个整数 NN

根据以下指示,打印 NN 的近似值。

  • 如果 NN 小于等于 103110^3-1,直接打印 NN
  • 如果 NN10310^3104110^4-1(包含两端)之间,截断 NN 的个位数并输出结果。
  • 如果 NN10410^4105110^5-1(包含两端)之间,截断 NN 的十位数及其以下的所有数字并输出结果。
  • 如果 NN10510^5106110^6-1(包含两端)之间,截断 NN 的百位数及其以下的所有数字并输出结果。
  • 如果 NN10610^6107110^7-1(包含两端)之间,截断 NN 的千位数及其以下的所有数字并输出结果。
  • 如果 NN10710^7108110^8-1(包含两端)之间,截断 NN 的万位数及其以下的所有数字并输出结果。
  • 如果 NN10810^8109110^9-1(包含两端)之间,截断 NN 的十万位数及其以下的所有数字并输出结果。

以上为通义千问 qwen-max 翻译,仅供参考。

Problem Statement

You are given an integer NN.
Print an approximation of NN according to the following instructions.

  • If NN is less than or equal to 103110^3-1, print NN as it is.
  • If NN is between 10310^3 and 104110^4-1, inclusive, truncate the ones digit of NN and print the result.
  • If NN is between 10410^4 and 105110^5-1, inclusive, truncate the tens digit and all digits below it of NN and print the result.
  • If NN is between 10510^5 and 106110^6-1, inclusive, truncate the hundreds digit and all digits below it of NN and print the result.
  • If NN is between 10610^6 and 107110^7-1, inclusive, truncate the thousands digit and all digits below it of NN and print the result.
  • If NN is between 10710^7 and 108110^8-1, inclusive, truncate the ten-thousands digit and all digits below it of NN and print the result.
  • If NN is between 10810^8 and 109110^9-1, inclusive, truncate the hundred-thousands digit and all digits below it of NN and print the result.

Constraints

  • NN is an integer between 00 and 109110^9-1, inclusive.

Input

The input is given from Standard Input in the following format:

NN

Output

Print the answer.

Sample Input 1

20230603

Sample Output 1

20200000

2023060320230603 is between 10710^7 and 108110^8-1 (inclusive).
Therefore, truncate the ten-thousands digit and all digits below it, and print 2020000020200000.

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