#MTHA0000003. Đếm bội trong một đoạn (Count Multiples in an Interval)
Đếm bội trong một đoạn (Count Multiples in an Interval)
Count Multiples in an Interval
Version: Phuoc Hung OJ Extended
Problem Statement
Given positive integers with , count the integers in that are divisible by .
Input
One line contains three positive integers , , and .
Output
Print the number of integers satisfying and .
Subtasks
- Subtask 1 (30 points):
- .
- .
- Subtask 2 (70 points):
- .
- .
Examples
Example 1
Input
5 20 4
Output
4
Explanation
The multiples in the interval are , so the answer is .
Example 2
Input
1 10 20
Output
0
Explanation
The smallest positive multiple of is , so the answer is .
Example 3
Input
1000000000000 1000000000100 25
Output
5
Explanation
The multiples are , , , , and , for a total of .