Rosetta Problems

Top of the Hill

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