I don't know whether this problem has tricky inputs,but I can offer you some cases:
5 8
[0;1,1,1,2]
1684 6441
[0;3,1,4,1,2,2,3,12]
1 9
[0;9]
2 4
[0;2]
4898 215
[22;1,3,1,1,2,1,6]
Can anybody help me with these problems???
1.If the input is 2 1....What should I do for the output?? [2;]??? or what??
2.Is any negative number in the input????
1. My program crashed on this input
2. If the first number is negative my program crashes, if the denominator is negative it outputs the same numbers as if the denominator was positive, except they are all negative also.
From this I doubt that the judge's data includes true integers or negative numbers.