← All problemsSign in

The indivisible!

Tom and Jerry are playing a game. Jerry tells Tom, a number k and 3 other numbers that are less than k. The 3 numbers are Co-prime. i.e., the only common divisor of the 3 numbers is 1. Now, Tom wins the game, if he tells the count of the numbers that are less than or equal to k and indivisible by all the 3 numbers given. Help Tom win the game! Remember, only those numbers that are not divisible by

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