#AT2184. D - FizzBuzz Sum Hard
D - FizzBuzz Sum Hard
当前没有测试数据。
D - FizzBuzz Sum Hard
Score : $400$ points
Problem Statement
Find the sum of integers between $1$ and $N$ (inclusive) that are not multiples of $A$ or $B$.
Constraints
- $1 \leq N, A,B \leq 10^9$
- All values in input are integers.
Input
Input is given from Standard Input in the following format:
Output
Print the answer.
10 3 5
22
The integers between $1$ and $10$ (inclusive) that are not multiples of $3$ or $5$ are $1,2,4,7$, and $8$, whose sum is $1+2+4+7+8 =22$.
1000000000 314 159
495273003954006262