← All problemsSign in

Adding Least Common Multiples

CodeChefRating 2383Open on judge ↗

Given A and B, compute the sum of lcm(a, b) over all pairs of positive integers a and b such that: (1) a1 such that n2 divides both a and b. Give your answer modulo 230. Input The first line contains the number of test cases, t (about 200). Each of the next t lines contains two space-separated integers A and B (1Output Print the answer to each test case on a separate line. Example Input: 4

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.

voice by Sarvam AI

Sign in to chat with the tutor and save your progress.

Sign in to start