Rosetta Problems

あるピアニスト

https://atcoder.jp/contests/code-festival-2014-qualb/tasks/code_festival_qualB_a