Loop the Loop
CodeChefOpen on judge ↗
Consider the word 'loop'. There are one L, two Os and one P. The general structure that can be observed here is that the count of L and P is the same and the count of Os is twice that of L or P. Words like lloooopp, lllooooooppp are simlar to the word loop as count(L)=count(P) and count(O)=2 x count(L) =2 x count(L). If the above conditions are satisfied along with the letters in the the word ap
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