TOM&JERRY
CodeChefOpen on judge ↗
Tom and Jerry are very good friends. They like to play several games. Today they are playing filling the jars, which is described as below. There are n jars of sizes N1, N2, N3, ... and Nn. The maximum number of cashews a jar can contain is equal to the size of the jar. Each player on his turn can put x number of cashews (where x is a perfect square and xNote: The total number of cashews is equa
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