시간 제한 | 메모리 제한 | 제출 | 정답 | 맞힌 사람 | 정답 비율 |
---|---|---|---|---|---|
1 초 | 512 MB | 69 | 24 | 17 | 30.909% |
Volodymyr’s favourite number is A and it has an odd number of positive divisors. When you add K to this number, the resulting sum also has an odd number of positive divisors. Given K, find all possible values of A, Volodymyr’s favourite number.
The only line of input contains K, a positive integer not exceeding 109.
On the first line, print the number of possible values of A. On the second line, print all possible values of A in ascending order, separated by a single space.
1
0
2
1 -1
Note that since zero has infinitely many divisors, it cannot be classified as a number with an odd number of divisors.