C - Composite Madness
CodeChefOpen on judge ↗
You really like composite$^{\dagger}$ numbers. Therefore, you call a number $N$ *good* if and only if it can be decomposed into $K$ ($K \ge 1$) composite numbers $A_1, A_2, \ldots, A_K$ satisfying the following conditions: - $A_1 + A_2 + \ldots + A_K = N$ - Each $A_i$ is composite. Given a number $N$, check if it is *good*. ------- $^{\dagger}$ An integer $X$ is said to be composite if and
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