Fractions Again?!
标签:
来源:
参考资料:
相似题目:
题目
It is easy to see that for every fraction in the form 1 k (k > 0), we can always find two positive integers x and y, x ≥ y, such that:
1/k = 1/x + 1/y
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 contains no more than 100 lines, each giving a value of k (0 < k ≤ 10000).
输出
For each k, output the number of corresponding (x, y) pairs, followed by a sorted list of the values of x and y, as