Rosetta Problems

ICPC Practice Contest 2021 - E: Emulation of Numbers

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