Rosetta Problems

パズル

https://atcoder.jp/contests/code-festival-2014-exhibition/tasks/code_festival_exhibition_a