Rosetta Problems

ニコニコレベル

https://atcoder.jp/contests/dwacon2017-prelims/tasks/dwango2017qual_b