#abc239b. B - Integer Division

B - Integer Division

Score : 200200 points

问题描述

给定一个整数 XX,其取值范围在 1018-10^{18}101810^{18}(包括两端点),请输出 X10\left\lfloor \dfrac{X}{10} \right\rfloor

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

Problem Statement

Given an integer XX between 1018-10^{18} and 101810^{18} (inclusive), print X10\left\lfloor \dfrac{X}{10} \right\rfloor.

Notes

For a real number xx, x\left\lfloor x \right\rfloor denotes "the maximum integer not exceeding xx". For example, we have $\left\lfloor 4.7 \right\rfloor = 4, \left\lfloor -2.4 \right\rfloor = -3$, and 5=5\left\lfloor 5 \right\rfloor = 5. (For more details, please refer to the description in the Sample Input and Output.)

Constraints

  • 1018X1018-10^{18} \leq X \leq 10^{18}
  • All values in input are integers.

Input

Input is given from Standard Input in the following format:

XX

Output

Print X10\left\lfloor \frac{X}{10} \right\rfloor. Note that it should be output as an integer.

Sample Input 1

47

Sample Output 1

4

The integers that do not exceed 4710=4.7\frac{47}{10} = 4.7 are all the negative integers, 0,1,2,30, 1, 2, 3, and 44. The maximum integer among them is 44, so we have 4710=4\left\lfloor \frac{47}{10} \right\rfloor = 4.

Sample Input 2

-24

Sample Output 2

-3

Since the maximum integer not exceeding 2410=2.4\frac{-24}{10} = -2.4 is 3-3, we have 2410=3\left\lfloor \frac{-24}{10} \right\rfloor = -3.
Note that 2-2 does not satisfy the condition, as 2-2 exceeds 2.4-2.4.

Sample Input 3

50

Sample Output 3

5

The maximum integer that does not exceed 5010=5\frac{50}{10} = 5 is 55 itself. Thus, we have 5010=5\left\lfloor \frac{50}{10} \right\rfloor = 5.

Sample Input 4

-30

Sample Output 4

-3

Just like the previous example, 3010=3\left\lfloor \frac{-30}{10} \right\rfloor = -3.

Sample Input 5

987654321987654321

Sample Output 5

98765432198765432

The answer is 9876543219876543298765432198765432. Make sure that all the digits match.

If your program does not behave as intended, we recommend you checking the specification of the programming language you use.
If you want to check how your code works, you may use "Custom Test" above the Problem Statement.

update @ 2024/3/10 10:18:48