102330: [AtCoder]ABC233 A - 10yen Stamp
Memory Limit:256 MB
Time Limit:2 S
Judge Style:Text Compare
Creator:
Submit:0
Solved:0
Description
Score : $100$ points
Problem Statement
Takahashi wants to send a letter to Santa Claus. He has an envelope with an $X$-yen (Japanese currency) stamp stuck on it.
To be delivered to Santa Claus, the envelope must have stamps in a total value of at least $Y$ yen.
Takahashi will put some more $10$-yen stamps so that the envelope will have stamps worth at least $Y$ yen in total.
At least how many more $10$-yen stamps does Takahashi need to put on the envelope?
Constraints
- $X$ and $Y$ are integers.
- $1 \le X,Y \le 1000$
Input
Input is given from Standard Input in the following format:
$X$ $Y$
Output
Print the answer as an integer.
Sample Input 1
80 94
Sample Output 1
2
- After adding zero $10$-yen stamps to the $80$-yen stamp, the total is $80$ yen, which is less than the required amount of $94$ yen.
- After adding one $10$-yen stamp to the $80$-yen stamp, the total is $90$ yen, which is less than the required amount of $94$ yen.
- After adding two $10$-yen stamps to the $80$-yen stamp, the total is $100$ yen, which is not less than the required amount of $94$ yen.
Sample Input 2
1000 63
Sample Output 2
0
The envelope may already have a stamp with enough value.
Sample Input 3
270 750
Sample Output 3
48
Input
题意翻译
给定 $x,y$,求 $x$ 需要加上多少个 $10$(可以是 $0$ 个)才能超过 $y$。 Tip:虽然题目要求的是超过 $y$,但是实际上是**大于等于** $y$ 即可。 Translated by ShanCreeper.Output
得分:100分
部分
问题描述
Takahashi 想要给圣诞老人寄一封信。他有一个信封,上面贴了一张 X 日元(日本货币)的邮票。
为了能够送达圣诞老人,信封上的邮票总价值必须至少为 Y 日元。
Takahashi 会在信封上再贴一些 10 日元的邮票,使信封上的邮票总价值至少为 Y 日元。
Takahashi 需要在信封上至少再贴多少张 10 日元的邮票?
部分
约束条件
X 和 Y 是整数。
1≤X,Y≤1000
部分
输入
输入格式如下:
X Y
部分
输出
将答案作为整数打印。
部分
样例输入 1
80 94
部分
样例输出 1
2
- 在 80 日元邮票上添加 0 张 10 日元邮票后,总价值为 80 日元,低于所需的 94 日元。
- 在 80 日元邮票上添加 1 张 10 日元邮票后,总价值为 90 日元,低于所需的 94 日元。
- 在 80 日元邮票上添加 2 张 10 日元邮票后,总价值为 100 日元,不低于所需的 94 日元。
部分
样例输入 2
1000 63
部分
样例输出 2
0
信封上可能已经有足够价值的邮票。
部分
样例输入 3
270 750
部分
样例输出 3
48