← All problemsSign in

Playing With Rectangles

Shyam, a school boy, who was in the chess team of their school wondered one day while playing chess that “how many different rectangles can be formed in a chess board?”. Write a program to solve Shyam’s problem and Let the size of the board be N x N, where 1 Input The single line will contain the number of test cases T. The second line will be the integer N, i.e the size of the square board.

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