AE00 - Rectangles

Byteman has a collection of N squares with side 1. How many different rectangles can he form using these squares?

Two rectangles are considered different if none of them can be rotated and moved to obtain the second one. During rectangle construction, Byteman can neither deform the squares nor put any squares upon any other ones.

Input

The first and only line of the standard input contains one integer N (1 <= N <= 10000).

Output

The first and only line of the standard output should contain a single integer equal to the number of different rectangles that Byteman can form using his squares.

Example

For the input data:

6

the correct result is:

8

Task author: Jakub Radoszewski.


Added by:Race with time
Date:2009-05-03
Time limit:1s
Source limit:50000B
Memory limit:1536MB
Cluster: Cube (Intel G860)
Languages:All except: ERL JS-RHINO NODEJS PERL6 VB.NET
Resource:Algorithmic Engagements 2009

hide comments
2013-11-05 20:08:30 Abhishek gupta
anyone other than o(n^2)


Last edit: 2013-11-05 20:09:21
2013-09-01 13:25:23 shauna paul
return 0;: reason for getting NZEC
2013-07-19 11:59:08 Hasil Sharma
recursive as well as iterative solutions are accepted
2013-07-18 14:55:16 Pranye Mawai
lucky to pass... 0.94 sec.. :P
2013-06-20 11:49:09 L
@Dark Knight
My program is showing the specified output for N=10^4 i.e 46884..
but the site is showing it as wrong answer??

Last edit: 2013-06-20 11:49:23
2013-06-19 15:41:29 Sagar Grover
Recursion makes it easy
2013-06-17 12:11:42 king
O(n^2) got passed :)
2013-06-03 10:08:34 chk
nice and easy :)

@ankur..10^4
ans=46884

Last edit: 2013-06-03 10:13:27
2013-05-30 15:14:50 Ankur Yadav
what is the answer for n=10000?
2013-05-30 10:49:34 Amey Telawane
easy problem,,, very short code :)
© Spoj.com. All Rights Reserved. Spoj uses Sphere Engine™ © by Sphere Research Labs.