Numbers Magic
CodeChefOpen on judge ↗
There are n stones. When Amy see the stones through a magical mirror, he observes some unique number on each stone. So when he multiplies all those numbers he gets the product from number 1 to n. Now, when Amy see stones, he wants to choose the number which can divide the product. He tries to think what will be the total ways (x) of choosing the stone(s) such that product of whose(stones) reflecti
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