Programming contests

DEIK Regionális Programozó Csapatverseny, egyetemi kategória, 2024. december 1.

December 1, 2024, 10:00 AM – December 1, 2024, 3:00 PM

Percentage

Péter has GG red and GG white balls. He selects AA and BB of them, respectively. We know that for a HA+BH\le A+B, and for a non-negative number aa, with aAa\le A and HaBH-a\le B, the probability of drawing exactly aa red balls in HH draws without replacement is: (Aa)(BHa)(A+BH) \frac{\binom{A}{a}\binom{B}{H-a}}{\binom{A+B}{H}}

Péter noticed that this value sometimes corresponds exactly to x%x\%, where 0x1000≤x≤100 is an integer, meaning, for example, 42%=0.4242\%=0.42.

He wants to know, for a given GG, which whole percentage values can be calculated exactly as probabilities in this way if he considers all possible combinations of A,B,a,HA,B,a,H. According to Peter, concepts like impossible or absolutely certain don’t exist, so he’s only interested in whole percentage values between 11 and 9999.

Let’s help him find the answer!

Input specification

A single line with number GG.

Output specification

The list of achievable percentage values between 11 and 9999, inclusive, for the given GG, sorted in ascending order. Separate the numbers with spaces.

Constraints

1G301\le G \le 30

Sample input 1

  1. 10
download as text file

Sample output 1

  1. 5 10 15 20 25 30 40 45 50 60 70 75 80 90
download as text file

Sample input 2

  1. 15
download as text file

Sample output 2

  1. 5 10 11 14 15 20 22 24 25 26 28 30 35 39 40 42 44 45 48 50 52 55 56 60 65 70 75 80 90
download as text file

Sample input 3

  1. 20
download as text file

Sample output 3

  1. 5 7 10 11 12 14 15 20 22 24 25 26 28 30 32 35 36 38 39 40 42 44 45 48 50 51 52 55 56 57 60 64 65 68 70 72 75 76 80 85 90 95
download as text file
University of Debrecen; Faculty of Informatics; v. 09/30/2024