- 1

URI 1323.

INPUT The input contains several test cases. Each test case is composed of a single line, containing only one integer N, representing the number of squares in each side of the grid (1 ≤ N ≤ 100). The end of input is indicated by a line containing only one zero. OUTPUT For each test case in the input, your program must print a single line, containing the number of different squares for the corresponding input

22nd Oct 2022, 10:33 PM
lkjhggf
2 Answers
+ 3
lkjhggf if the grid is NxN (square), then the number of squares in the grid is N squared, or NxN squares. Example: N = 20; squares = N*N; // squares = 400
23rd Oct 2022, 5:03 AM
Brian
Brian - avatar
+ 2
Attempts?
23rd Oct 2022, 4:00 AM
A͢J
A͢J - avatar