Masala #ELRJ74F7QN
Oraliq yig'indisi
Sizga \(N\) natural son berilgan, siz \(L\) dan \(R\) gacha bo'lgan barcha natural sonlar yig'indisi \(N\) ga teng bo'ladigan barcha \([L, R]\) natural sonlar juftliklarini toping.
Kirish faylida yagona butun son, \(N (3 \le N \le 10^{10})\) soni kiritiladi.
Chiqish faylida \(1 \le L < R\) hamda \(L + (L+1)+...+R=N\)shartni qanoatlantiradigan barcha \([L, R]\) juftliklarni chop eting. Bunday javoblar ko'p bo'lsa dastlab \(L\) qiymati kattaroqlarini chop eting.
# | input.txt | output.txt |
---|---|---|
1 |
10 |
1 4 |
2 |
27 |
13 14 8 10 2 7 |