Problem: http://www.usaco.org/index.php?page=viewproblem2&cpid=787
I\'ve been getting only 3 cases right (1,5 and 7) in this problem but I can\'t find why.