- 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
2 Respuestas
+ 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
+ 2
Attempts?