UVa 880 - Cantor Fractions

Summary
Like 264 http://www.algorithmist.com/index.php/UVa_264

Input
1 3 14 7 10000000

Output
1/1 1/2 2/4 4/1 1629/2844