Rosetta Problems

錬金術士

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