Many Squares
CodeChefOpen on judge ↗
Note : This question carries $400$ $points$ Chef Mustu has a very $very$ expensive laptop. The laptop has a $M$x$N$ grid pattern on its cover i.e., the pattern is a grid with $M$+$1$ rows and $N$+$1$ columns of dots. One day while admiring his laptop he wonders just how many different squares can he find in this grid and what would be the sum of the total area of all of those squares. To find a
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