uva 10891 Game of Sum:
http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=1832
pdf:
http://uva.onlinejudge.org/external/108/10891.pdf