When the ancient Egyptians wrote fractions they were only able to use ones of the form 1/a called unit fractions. An Egyptian wanting to write the fraction b/c, where b was not 1, had to write it as the sum of different unit fractions, For example, they would write 5/6 as 1/2 + 1/3 Write a program which converts a normal fraction into an Egyptian fraction.

Taken from the 2008 Informatics Olympiad.

Click here to view all the competition tasks.