Divisors
Practice
3 (10 votes)
Open
Algorithms
Approved
Easy
Mathamatics
Problem
91% Success 12139 Attempts 20 Points 1s Time Limit 256MB Memory 1024 KB Max Code
Given three numbers N, A and B. Find how integers in range from 1 to N are divisible by A or B.
Input:
Input contains three integers N, A and B separated by space.
Output:
Print total numbers of integers in range from 1 to N are divisible by A or B.
Constraints:
Test Files 1 to 5:
1<=N<=100
1<=A<=100
1<=B<=100
Test Files 6 to 10
1<=N<=1012
1<=A<=105
1<=B<=105
Submissions
Please login to view your submissions
Similar Problems
Points:20
Tags:
EasySimple-math
Points:20
18 votes
Tags:
Ad-HocBasic ProgrammingOpenApprovedEasyMathamatics
3.OR Sum
Points:20
2 votes
Tags:
Basic ProgrammingBit manipulationBasics of Bit ManipulationEasymathsBit Manipulation
Editorial