Rosetta Problems

The Price of a Cake

https://onlinejudge.u-aizu.ac.jp/problems/0440