Fractions Again?!
Very easy
Execution time limit is 3 seconds
Runtime memory usage limit is 64 megabytes
It is easy to see that for every fraction in the form (k > 0), we can always find two positive integers x and y, x ≥ y, such that:
Now our question is: can you write a program that counts how many such pairs of x and y there are for any given k?
Input
Input contains no more than 100 lines, each giving a value of k (0 < k ≤ 10000).
Output
For each k, output the number of corresponding (x, y) pairs, followed by a sorted list of the values of x and y, as shown in the sample output.
Examples
Input #1
Answer #1
Submissions 446
Acceptance rate 51%