Uzastopni
의견: 0
1 \(s / 64\) \(MB / 80\) points
Output all the ways in which a given positive integer \(N\) can be obtained as the sum of
several (two or more) consecutive positive integers.
1
The first line of input contains the positive integer \(N\)
(3 ≤ \(N\)
≤ 10 {10}{ }).
For each sum of consecutive positive integers that is equal to \(N\)
, in one line output the first
and the last addend. The order of lines in the output is not important. In each test case, at
least one corresponding sum will exist.
10
27output
1 4
13 14
8 10
2 7Clarification of the first test case: 10 = 1 + 2 + 3 + 4.
1The author apologizes if reading the task took too long, and promises that, in the future, he will try to be more
concise, i.e., that he will try to explain the task using as less words and apologies in the footnotes as possible.
평가 및 의견
Uzastopni
Log in to rate problems.
아직 의견이 없습니다. 자격이 된다면 위 양식에서 가장 먼저 평가해 보세요.
풀이 제출
Uzastopni