← All problemsSign in

N Triplets

CodeChefRating 1426Open on judge ↗

Alice is still not satisfied with Bob's math skills so she gave him a new challenge. Given a positive integer $N$, find any $3$ **distinct** positive integers $A, B, C$ such that: - The product of any two of these $3$ integers is a [divisor](https://en.wikipedia.org/wiki/Divisor) of $N$. - The product of all three integers is a multiple of $N$. If multiple solutions exist, you may print **any**

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