Below is the text of the page https://pc-ua.com.ua/page2559.html stored 2008-10-09 by archive.org.ua. The original page over time could change. View as original html

Задача F

Висновки олімпіади 2005 року -> Задачі основного туру - Задача F [page2497.html] Ваш браузер не поддерживает JavaScript! Альтернативная версия меню без JavaScript здесь Висновки олімпіади 2005 року -> Задачі основного туру Задача F Sum F Partitions Into Consecutive Integers (1 sec) Input file: F.IN Output: Standard output For any positive integer n, let f (n) denote the number of ways in which n can be expressed as the sum of consecutive positive integers. For example, since 9 can be expressed as 2+3+4 and as 4+5 and as 9, we have f (9) = 3. In this problem you must find and print all f ( n ) representations of n as the sum of consecutive positive integers in ascending order of their first summand. Input Each line contains one integer n (1 ЎЬ n ЎЬ 10 6 ). Output For each input n print all f (n) representations of n as the sum of consecutive positive integers in ascending order of their first summand as shown in sample output. Input Output 8 9 15 8=8 9=2+3+4 9=4+5 9=9 15=1+2+3+4+5 15=4+5+6 15=7+8 15=15 Developed by Deep Vision