Alice and Bob
CodeChefOpen on judge ↗
Bob is afraid of remainders. To annoy him, Alice gave him an array of $N$ integers $A$ and an integer value $K$. Bob has to find the sum of remainders when each element of $A$ is divided by $K$. Sum = rem($A_1/K$) + rem($A_2/K$) + .... + rem($A_{N-1}/K$) + rem($A_N/K$) Can you help Bob in finding the sum? ###Input: In the first line, you will be given $T$ which is the number of test
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