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
Simon Liang: 2014-04-11 23:28:04

so many gotcha's in this one

Konstantin: 2014-03-01 00:16:27

the picture is broken

Neel Jinwala: 2014-02-18 12:28:13

refrained from printing \n (newline) at the end.. ACcepted..

RAJAT SINGH: 2014-01-21 20:51:24

please explain the solve

Sidharth Raja: 2014-01-10 21:14:12

0.00 AC at first go. That feel. :')

saanc: 2013-12-28 13:05:24

nice one...simple maths...AC with ex. time 0.02 sec.

Ashwini: 2013-12-23 13:01:24

can anyone check why i am getting wrong answer. this question is so simple.
for n=10000 output 46884. is it wrong

Last edit: 2013-12-23 13:48:47
lzyerste: 2013-12-08 18:06:16

2 lines in python

californiagurl: 2013-11-17 14:55:39

is anyone using hashing?
edit: no need of dat... n*sqrt(n) gave AC in .09 sec :)

Last edit: 2013-11-17 19:13:01
shantanu: 2013-11-16 10:03:24


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