Rosetta Problems

盗まれた宝石

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