Problem 878 · Hard
Binary search the answer using inclusion-exclusion to count multiples of a or b up to x.
Open the interactive visualisation