← All problemsSign in

Aditya and his Homework

Aditya's math teacher was upset with him for not doing his homework. He missed it because he was an avid coder who kept programming instead. She gave him a punishment. He's got an algorithm for it but he wants a better one. He will give you points only if you beat his or match his algorithm in terms of efficiency. Here's his problem - His teacher gave him T questions. Each question is of the f

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