acmsguru |
---|
Закончено |
Impossible" (without quotes) to the only line of output. If there's one, output the sequence of numbers written starting with A and ending with B, one per line. You're not asked to find the shortest possible sequence, however, you should find a sequence with no more than 500 numbers. It is guaranteed that if there exists some sequence for the given A and B, then there exists a sequence with no more than 500 numbers in it.
sample input | sample output |
12 57 | 12 16 24 27 30 40 50 52 54 57 |
sample input | sample output |
3 6 | Impossible |
Название |
---|