Chef and Exponentiation
CodeChefOpen on judge ↗
Chef likes strings which contains all vowels. Chef is very confused to form a string as Vowels and Consonants have some cost $v$ and $c$ respectively, associated to them. *The absolute values of $v$ and $c$ will always be some power of 5 and 2 respectively.* Chef wants to minimize the cost $C$ to form the string. As Chef is fond of exponents and Digital Root so he decided to apply these operations
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