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.


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


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.


For the input data:


the correct result is:


Task author: Jakub Radoszewski.

hide comments
gourav: 2012-10-17 16:00:26

20th ;)

paras meena: 2012-10-12 12:25:01

whts test cases plz tell me

Raginee: 2012-09-28 19:30:07

cant get the question any one explain plz..

Sumit Khanna: 2012-07-26 19:08:26

"1" appears to be the input for case 9,was getting WA before i ment my code to output 1 for 1

Teddy Budiono Hermawan: 2012-06-02 01:04:52

Here's the disappeared image

legrand: 2012-04-20 08:15:34

the picture has disapeared, can you fix it

Sharavana guru: 2012-04-03 09:21:48

@ B.R.ARVIND thanks for the logic

Last edit: 2012-04-03 18:50:34
B.R.ARVIND: 2012-03-28 19:49:42

for(int i=1;i<=n;i++) for(int j=1;i*j<=n;j++)s.insert(pair<int,int> (min(i,j),max(i,j))); tats the logic

amit kumar: 2012-03-04 18:06:16

square is also rectangle
@rishab thanx for testcase

Surya kiran: 2012-02-15 13:59:12

cant get the question any one explain plz..

Added by:Race with time
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