Problem #342

Fraction decomposition
Public 08/05/16 8xp Programming 25.9%

There is a smallest $ n $ for which there exists a set of distinct integers $ S = \{ s_1, s_2, \dots, s_n \} $ such as
$ \frac{17}{670} = (1-\frac{1}{s_1})\times(1-\frac{1}{s_2})\times\dots\times(1-\frac{1}{s_n}) $

Actually, for this least n the set S is unique.

You are given that S is composed of the union of no more than 4 subsets of consecutive integers.

Find S

Answer format: 'the smallest element'-'the largest element' comma separated for each subset.

For instance, if $ S = \{2, 3, 4, 5, 11, 12, 13\} = \{2, 3, 4, 5\} \cup \{11, 12, 13\} $, the answer would be: 2-5,11-13

[My timing: 2 sec ]



You need to be a member to keep track of your progress.
Register


Time may end, but hope will last forever.

Other Challenge Sites

Contact

elasolova
[64][103][109][97][105][108][46][99][111][109]