[ABC318A] Full Moon
该比赛已结束,您无法在比赛模式下递交该题目。您可以点击“在题库中打开”以普通模式查看和递交本题。
Problem Statement
Takahashi likes full moons.
Let today be day . The first day on or after today on which he can see a full moon is day . After that, he can see a full moon every days, that is, on day , day , and so on.
Find the number of days between day and day , inclusive, on which he can see a full moon.
Constraints
- All input values are integers.
Input
The input is given from Standard Input in the following format:
NMP
Output
Print the answer as an integer.
Sample1
13 3 5
3
He can see a full moon on day , , , , and so on.
From day to , he can see a full moon on three days: day , , and .
Sample2
5 6 6
0
There may be no days he can see a full moon.
Sample3
200000 314 318
628
Programming exercise on 21 August
- 状态
- 已结束
- 规则
- XCPC
- 题目
- 4
- 开始于
- 2024-8-21 17:30
- 结束于
- 2024-8-21 18:30
- 持续时间
- 1 小时
- 主持人
- 参赛人数
- 2