Either, but Not Both
InterviewTime limit2sMemory limit2048 MB
Count the integers from 1 to N that are divisible by exactly one of A and B.
- Level
Easy2 of 10
- Topics
- Math, Implementation
- Solved
- No attempts yet
Problem
Positive integers , , and are given. Here, .
Output the number of integers from to (inclusive) that are divisible by exactly one of and .
Input
The input is given in the following format.
N
A
B
Output
Output the count from the problem, without the unit (個). Output nothing other than the answer. Do not print prompts such as a request for input.
Constraints
- .
- .
- .
- .
- All input values are integers.