MRECTCNT - Rectangles Counting
Let R be a rectangle with integer side lengths. The rectangle is divided into unit squares. Considering one of the diagonals, we denote by f(R) the number of squares which have a common interior point with it. For example, if the side lengths of R are 2 and 4 then f(R)=4. Write a program to find out the number of all different rectangles R for which f(R) = N. Two rectangles with sides a x b and b x a are not different.
Input
In a single line of the standard input the integer N (0 < N < 10^6) is given.
Output
The only line of the standard output should contain an integer – the calculated number of rectangle.
Sample Input
4
Sample Output
4Problem for kid - Please, think like kid.
hide comments
Luke Pebody:
2011-05-17 16:48:01
I ran my code on ideone and it finishes in a fraction of a second (and I calculate the values for all N, so the speed does not depend on the input). Are the spoj computers slower than the ideone ones? |
|
biQar:
2011-03-26 02:09:42
i don't know how the kids solve this problem !!! this problem is really not for kids !!! :( |
|
Ehor Nechiporenko:
2009-12-01 15:50:28
I don't think, that kids know factorisation |
|
Drew Saltarelli:
2009-07-30 18:33:42
what a lousy test case... |
|
~ adieus ~:
2009-06-19 01:21:32
Please,think like kid --- what !!!!!!! |
Added by: | psetter |
Date: | 2009-02-18 |
Time limit: | 1s |
Source limit: | 50000B |
Memory limit: | 1536MB |
Cluster: | Cube (Intel G860) |
Languages: | All except: ERL JS-RHINO NODEJS PERL6 VB.NET |
Resource: | BOI For Kid 08 |