102391: [AtCoder]ABC239 B - Integer Division

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

Description

Score : $200$ points

Problem Statement

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

Notes

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

Constraints

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

Input

Input is given from Standard Input in the following format:

$X$

Output

Print $\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 $\frac{47}{10} = 4.7$ are all the negative integers, $0, 1, 2, 3$, and $4$. The maximum integer among them is $4$, so we have $\left\lfloor \frac{47}{10} \right\rfloor = 4$.


Sample Input 2

-24

Sample Output 2

-3

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


Sample Input 3

50

Sample Output 3

5

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


Sample Input 4

-30

Sample Output 4

-3

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


Sample Input 5

987654321987654321

Sample Output 5

98765432198765432

The answer is $98765432198765432$. 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.

Input

题意翻译

给出 $X$,求 $⌊\frac{X}{10} ⌋$

Output

得分:200分

问题描述

给定一个在$-10^{18}$和$10^{18}$(含)之间的整数$X$,打印$\left\lfloor \dfrac{X}{10} \right\rfloor$。

注意

对于实数$x$,$\left\lfloor x \right\rfloor$表示“不超过$x$的最大整数”。 例如,我们有$\left\lfloor 4.7 \right\rfloor = 4, \left\lfloor -2.4 \right\rfloor = -3$,和$\left\lfloor 5 \right\rfloor = 5$。 (更多详情,请参阅样例输入和输出的描述。)

约束

  • $-10^{18} \leq X \leq 10^{18}$
  • 输入中的所有值都是整数。

输入

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

$X$

输出

打印$\left\lfloor \frac{X}{10} \right\rfloor$。 注意,它应该输出为一个整数。


样例输入1

47

样例输出1

4

不超过$\frac{47}{10} = 4.7$的整数包括所有的负整数、0、1、2、3和4。 其中最大的整数是4,所以我们有$\left\lfloor \frac{47}{10} \right\rfloor = 4$。


样例输入2

-24

样例输出2

-3

因为不超过$\frac{-24}{10} = -2.4$的最大整数是$-3$,所以我们有$\left\lfloor \frac{-24}{10} \right\rfloor = -3$。
注意,$-2$不满足条件,因为$-2$超过了$-2.4$。


样例输入3

50

样例输出3

5

不超过$\frac{50}{10} = 5$的最大整数是5本身。 因此,我们有$\left\lfloor \frac{50}{10} \right\rfloor = 5$。


样例输入4

-30

样例输出4

-3

就像上一个例子一样,$\left\lfloor \frac{-30}{10} \right\rfloor = -3$。


样例输入5

987654321987654321

样例输出5

98765432198765432

答案是$98765432198765432$。 确保所有的数字都匹配。

如果你的程序没有按预期运行,我们建议你检查你使用的编程语言的规格。
如果你想检查你的代码是如何工作的,你可以在问题描述上方使用“自定义测试”。

加入题单

上一题 下一题 算法标签: