PHƯỚC HƯNG OJ · THỬ THÁCH THUẬT TOÁN
#GL0000001. Đếm bội số trong đoạn (Between a and b ...)
HỌC THEO LỘ TRÌNH
1 lộ trìnhBài tập thuộc lộ trình
Mục lục đề ⌄
Đang đọc
Đếm bội số trong đoạn (Between a and b ...)
Between a and b ...
Source: AtCoder
Version: Phuoc Hung OJ Extended
Problem Statement
Given non-negative integers with and a positive integer , consider all integers in the inclusive interval . Count those divisible by . Zero is divisible by every positive .
Input
One line containing .
Output
Print the number of qualifying integers.
Subtasks
- Subtask 1 (20 points): ;
- Subtask 2 (30 points): ;
- Subtask 3 (50 points): ;
Examples
Input
4 8 2
Output
3
Explanation
The numbers are the only multiples of in the inclusive interval, so the answer is .