Logo
(追記) (追記ここまで)

12116번 - Uzastopni 스페셜 저지다국어

시간 제한메모리 제한제출정답맞힌 사람정답 비율
1 초 64 MB2241189556.213%

문제

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. -The 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-

입력

The first line of input contains the positive integer N (3 ≤ N ≤ 1010).

출력

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.

제한

예제 입력 1

10

예제 출력 1

1 4

예제 입력 2

27

예제 출력 2

13 14
8 10
2 7

힌트

10 = 1 +たす 2 +たす 3 +たす 4.

출처

Contest > Croatian Open Competition in Informatics > COCI 2016/2017 > Contest #7 2번

  • 스페셜 저지를 만든 사람: isku
(追記) (追記ここまで)

출처

대학교 대회

  • 사업자 등록 번호: 541-88-00682
  • 대표자명: 최백준
  • 주소: 서울시 서초구 서초대로74길 29 서초파라곤 412호
  • 전화번호: 02-521-0487 (이메일로 연락 주세요)
  • 이메일: contacts@startlink.io
  • 통신판매신고번호: 제 2017-서울서초-2193 호

AltStyle によって変換されたページ (->オリジナル) /