103041: [Atcoder]ABC304 B - Subscribers

Memory Limit:256 MB Time Limit:2 S
Judge Style:Text Compare Creator:
Submit:5 Solved:0

Description

Score : $200$ points

Problem Statement

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

  • If $N$ is less than or equal to $10^3-1$, print $N$ as it is.
  • If $N$ is between $10^3$ and $10^4-1$, inclusive, truncate the ones digit of $N$ and print the result.
  • If $N$ is between $10^4$ and $10^5-1$, inclusive, truncate the tens digit and all digits below it of $N$ and print the result.
  • If $N$ is between $10^5$ and $10^6-1$, inclusive, truncate the hundreds digit and all digits below it of $N$ and print the result.
  • If $N$ is between $10^6$ and $10^7-1$, inclusive, truncate the thousands digit and all digits below it of $N$ and print the result.
  • If $N$ is between $10^7$ and $10^8-1$, inclusive, truncate the ten-thousands digit and all digits below it of $N$ and print the result.
  • If $N$ is between $10^8$ and $10^9-1$, inclusive, truncate the hundred-thousands digit and all digits below it of $N$ and print the result.

Constraints

  • $N$ is an integer between $0$ and $10^9-1$, inclusive.

Input

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

$N$

Output

Print the answer.


Sample Input 1

20230603

Sample Output 1

20200000

$20230603$ is between $10^7$ and $10^8-1$ (inclusive).
Therefore, truncate the ten-thousands digit and all digits below it, and print $20200000$.


Sample Input 2

0

Sample Output 2

0

Sample Input 3

304

Sample Output 3

304

Sample Input 4

500600

Sample Output 4

500000

Input

题意翻译

### 题目描述 给你一个整数 $N$,请按以下规则输出 $N$ 的近似值。 - 如果 $N\le10^3-1$,依原样输出 $N$ 。 - 如果 $10^3\le N \le 10^4-1$,把 $N$ 的个位数置零并输出结果。 - 如果 $10^4\le N \le 10^5-1$,把 $N$ 的十位及以下的数置零并输出结果。 - 如果 $10^5\le N \le 10^6-1$,把 $N$ 的百位及以下的数置零并输出结果。 - 如果 $10^6\le N \le 10^7-1$,把 $N$ 的千位及以下的数置零并输出结果。 - 如果 $10^7\le N \le 10^8-1$,把 $N$ 的万位及以下的数置零并输出结果。 - 如果 $10^8\le N \le 10^9-1$,把 $N$ 的十万位位及以下的数置零并输出结果。 ### 输入格式 共一行一个整数 $N(0\le N\le 10^9-1)$。 ### 输出格式 共一行一个整数表示结果。

Output

得分:200分

问题描述

给你一个整数 $N$。
根据以下说明打印 $N$ 的近似值。

  • 如果 $N$ 小于或等于 $10^3-1$,则按原样打印 $N$。
  • 如果 $N$ 在 $10^3$ 和 $10^4-1$ 之间(包括),则删除 $N$ 的个位数并打印结果。
  • 如果 $N$ 在 $10^4$ 和 $10^5-1$ 之间(包括),则删除 $N$ 的十位数和所有低于它的位数并打印结果。
  • 如果 $N$ 在 $10^5$ 和 $10^6-1$ 之间(包括),则删除 $N$ 的百位数和所有低于它的位数并打印结果。
  • 如果 $N$ 在 $10^6$ 和 $10^7-1$ 之间(包括),则删除 $N$ 的千位数和所有低于它的位数并打印结果。
  • 如果 $N$ 在 $10^7$ 和 $10^8-1$ 之间(包括),则删除 $N$ 的万位数和所有低于它的位数并打印结果。
  • 如果 $N$ 在 $10^8$ 和 $10^9-1$ 之间(包括),则删除 $N$ 的十万位数和所有低于它的位数并打印结果。

约束条件

  • $N$ 是一个在 $0$ 和 $10^9-1$ 之间的整数(包括)。

输入

输入是通过标准输入以以下格式给出的:

$N$

输出

打印答案。


样例输入 1

20230603

样例输出 1

20200000

$20230603$ 在 $10^7$ 和 $10^8-1$ 之间(包括)。
因此,删除万位数和所有低于它的位数,打印 $20200000$。


样例输入 2

0

样例输出 2

0

样例输入 3

304

样例输出 3

304

样例输入 4

500600

样例输出 4

500000

加入题单

算法标签: