Rosetta Problems

こんなの一瞬だろ

https://hoj.hamako-ths.ed.jp/onlinejudge/problems/1123