← All problemsSign in

Ballon d Or

CodeChefRating 1062Open on judge ↗

Leo has already won the Ballon d'Or $8$ times, so he is really impressed with it (is he?). Leo has an array $A$ containing $N$ integers. Each element of this array is either $1$ or $2$. He wants to figure out if the product of all the elements of the array can be written as an $8$-th power of some integer, i.e, $k^8$ for some integer $k$. Print `Yes` if it can and `No` if it can't. ### Input

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