Divide and Multiply
CodeChefOpen on judge ↗
Amit, a student of MANIT likes to division and multiplication a lot. He also like squares of the numbers. He is very fast in doing these calculation. He found a problem one day. The problem was stated as below: For a given array (1-based indexing) of size N, he has to find the sum of squares of the numbers in the array indexing from L to R (both inclusive). He found this problem very simple. So
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