← All problemsSign in

Squares and Cubes

Ash is interested in the properties of squares and cube numbers, especially their sum. His friend Brock gives Ash a number $N$, and Ash makes a list of $N$ integers. For each valid index i, Ash wants to take the $A_i$th number, find the sum of its square and cube and print the same. But he is too busy practicing for the Pokemon League so he requests you, his best friend to solve this prob

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