← All problemsSign in

Eliminate Multiples

You are asked to do the following operations: - Take a list of all the natural numbers, i.e, $1, 2, 3, 4, ....$ upto infinity. - Remove all the multiples of $n$ in this list. - Print the $k$-th element of the remaining list. ###Input: The first line contains $t$, the number of test cases. The one and only line of each test case contains 2 space separated integers, $n$ and $k$. ###Ou

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