Copy and Paste
CodeChefOpen on judge ↗
In an exam in IIT Kanpur, the question paper consists of infinite questions. Ram, being a studious guy, aims to attempt infinite questions. In the i-th question, Ram answers are worth R[i] marks. However, he does not know the answer to all, and instead of thinking about the questions, repeats his answer after every S questions, i.e., the answer given by Ram for the K-th question is same as the ans
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