PDP-20 (2008) - Phase C' - 1 (blocks)

View as PDF

Submit solution

Points: 25 (partial)
Time limit: 15.0s
Memory limit: 64M

Author:
Problem type
Allowed languages
C, C++, Java, Pascal, Python
Data Blocks

The Hellenic Society of Scientists & IT Professionals (EPY), celebrating 30 years of contribution, has set up a web server for publishing the vast material that has been produced. This material is stored on storage units, in different servers, across multiple academic institutions. The web server has the capability to retrieve segments of the stored information with a variable number of blocks each time. A necessary condition each time is: The total number of existing blocks must be an integer multiple of the number of blocks being retrieved.

Problem:

Develop a program in one of the IOI languages ​​that: After reading the total number of existing blocks of stored information, will return the number of possible ways to retrieve it and how many blocks are transferred each time, in ascending order.

Input Files:

The input files named blocks.in are text files with exactly one number N ( 15 \le N \le 999.999.999), the total number of existing blocks.

Output Files:

The output files named blocks.out are text files with the following structure. The first line contains an integer K representing the number of different retrieval methods of the data. Following are K lines, each containing a number indicating the number of blocks retrieved in each case.

Example of Input - Output Files

STDIN (blocks.in)

15

STDOUT (blocks.out)

3
1
3
5

Formatting: In the output, each line terminates with a newline character.
Maximum execution time: 15 sec.


Comments

There are no comments at the moment.