100 atcoder#ABC099B. [ABC099B] Stone Monument
[ABC099B] Stone Monument
Score : points
Problem Statement
In some village, there are towers that are meters high from west to east, at intervals of meter.
It had been snowing for a while before it finally stopped. For some two adjacent towers located meter apart, we measured the lengths of the parts of those towers that are not covered with snow, and the results are meters for the west tower, and meters for the east tower.
Assuming that the depth of snow cover and the altitude are the same everywhere in the village, find the amount of the snow cover.
Assume also that the depth of the snow cover is always at least meter.
Constraints
- All values in input are integers.
- There is no input that contradicts the assumption.
Input
Input is given from Standard Input in the following format:
Output
If the depth of the snow cover is meters, print as an integer.
8 13
2
The heights of the two towers are meters and meters, respectively. Thus, we can see that the depth of the snow cover is meters.
54 65
1