CPCRC1B - Squares

Ali, for making fun for his sister, proposed her the following problem.

Having an N×N grid, how many squares are there?

Input

Integer 1<=N<=50000 indicating the length of the grid.

Input terminates with N=0.

Output

The number of squares.

Example

Input:
1
2
17
21
27
0
Output: 1
5
1785
3311
6930

Added by:Tii
Date:2010-10-25
Time limit:1s
Source limit:50000B
Memory limit:1536MB
Cluster: Cube (Intel G860)
Languages:All except: ASM64
Resource:http://cs.ikiu.ac.ir/cms/icpc/training/7-contest/86-contest1

hide comments
2017-05-28 20:04:30
i am kinda sure that my solution is correct,@tii can u plz tell me where am i wrong. '_'
solution id- 19508829
<snip>

Last edit: 2023-03-10 20:27:54
© Spoj.com. All Rights Reserved. Spoj uses Sphere Engine™ © by Sphere Research Labs.