Rosetta Problems

Rotation Game

https://atcoder.jp/contests/jag2013summer-day4/tasks/icpc2013summer_day4_j