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.
hide comments
|
mahabir10:
2020-09-21 13:30:06
Extremely Easy one |
|
hblord787:
2020-06-29 08:33:33
an O(1) solution is possible for it .. just try to find that |
|
ashwin0710:
2020-06-10 17:29:23
Easy one, dont think the solution to be too complicated......Can be done in O(n*sqrt(n)) |
|
shashankchdhry:
2020-04-09 19:30:42
Hint: Analyse the given diagram. |
|
rajrawat_:
2019-12-20 15:41:37
Fuck i am not able to solve it
|
|
mriow:
2019-08-09 09:07:30
O(sqrt(n)) with a quite straighfoward solution using the picture provided. |
|
king_25:
2019-07-30 12:09:37
AC,Hint:find factors. Last edit: 2019-07-30 12:12:14 |
|
hetp111:
2019-04-11 16:59:34
did it in O(n*sqrt(n))... =( |
|
alfeberlin:
2019-04-04 13:15:10
See also https://oeis.org/A094820
|
|
souravramos04:
2019-02-22 15:23:15
Don't forget to initialize your count to 0. AC on 6th attempt. |
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 |