#abc233a. A - 10yen Stamp

A - 10yen Stamp

Score : 100100 points

问题描述

高桥想给圣诞老人寄一封信。他有一个信封,上面贴着一张面值为 XX 日元(日本货币)的邮票。

为了能成功寄送给圣诞老人,信封上的邮票总价值必须至少达到 YY 日元。

高桥打算再贴一些面值为 1010 日元的邮票,以确保信封上邮票的总价值至少为 YY 日元。

请问高桥至少需要在信封上再贴多少张面值为 1010 日元的邮票?

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

Problem Statement

Takahashi wants to send a letter to Santa Claus. He has an envelope with an XX-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 YY yen.
Takahashi will put some more 1010-yen stamps so that the envelope will have stamps worth at least YY yen in total.
At least how many more 1010-yen stamps does Takahashi need to put on the envelope?

Constraints

  • XX and YY are integers.
  • 1X,Y10001 \le X,Y \le 1000

Input

Input is given from Standard Input in the following format:

XX YY

Output

Print the answer as an integer.

Sample Input 1

80 94

Sample Output 1

2
  • After adding zero 1010-yen stamps to the 8080-yen stamp, the total is 8080 yen, which is less than the required amount of 9494 yen.
  • After adding one 1010-yen stamp to the 8080-yen stamp, the total is 9090 yen, which is less than the required amount of 9494 yen.
  • After adding two 1010-yen stamps to the 8080-yen stamp, the total is 100100 yen, which is not less than the required amount of 9494 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

update @ 2024/3/10 10:08:23