TCCC October '24 P1 - Scaling Up

View as PDF

Submit solution

Points: 3
Time limit: 1.0s
Memory limit: 64M

Author:
Problem type

While grocery shopping, you weighed a bag of apples. However, the scale at the store is faulty, and always reads a certain amount M below what it should be. In addition, it measures in grams, but you need a measurement in kilograms. Can you find an accurate weight for your apples?

Input Specification

The first line of input will be an integer N (1 \le N \le 10^9), representing the grocery store's scale measurement in grams.
The second line of input will be an integer M (-N \le M \le 10^9), representing the store scale's amount of error.

Output Specification

An integer representing the actual mass of the apples in kilograms (rounded down).

Sample Input

1600
426

Sample Output

2

Comments

There are no comments at the moment.