Equation Solver
x*y = a + b*lcm(x,y) + c*gcd(x,y) It's easy: you are to write a program which for given a, b and c finds the number of pairs of positive integers (x, y) satisfying this equation. Here * stands for multiplication, gcd(x,y) stands for the greatest common divisor of x and y, while lcm(x,y) stands for the least common multiple of x and y. Input The first line of the input file contains one intege
HINT LADDERno hints yet
L1 Observation
L2 Technique
L3 Approach
L4 Pseudo-code
🔒
L5 Full solution
L5 unlocks only if you insist twice
solution.cppC++17
CodeSearch Tutor
Hints, not spoilers — it won’t hand over the full solution unless you insist.
Sign in to chat with the tutor and save your progress.
Sign in to start