Problem number 10012 UVa ACM