Solution to UVa 441 - Lotto