编程介的小学生 2017-04-08 13:23 采纳率: 0.4%
浏览 797
已采纳

ToT

It is now the 30th century and in kingdom ToT, there is a very strong air defending system that there is a fighter plane set in every grid point (x, y) (where x, y ≥ 0. Regard it as a 2-D plane where y = 0 is ground and y denotes altitude). It is almost all-conquering.

But after a placid night, the news that all fighter plane with y ≤ x are all destroyed is reported which shocks the king of ToT. While on the other hand, kingdom TvT, the neighbour of ToT, at the same time as the criminal is planning a new attack.

The new attack is described like this. A super weapon is placed on the point (0, H), which is on the border of the two kingdoms. When it is launched, it will fly along the direction toward (X, Y). It will destroy all the fighter plane right below it or it passes. So please calculate the number of fighter plane it can destroy.

Input

There are multiple cases (no more than 2000). For each case, there is only one line with three integers H, X, Y (0 ≤ H ≤ Y ≤ X ≤ 108) which are described above.

Output

For each case, print one integer, the number of fighter plane it can destroy.

Sample Input

1 2 2
2 4 4
Sample Output

1
4

  • 写回答

1条回答 默认 最新

  • devmiao 2017-04-08 15:04
    关注
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?