Rosetta Problems

Free Contest 86 - F7

https://oj.vnoi.info/problem/fc086_f7