Rosetta Problems

A Gift From the Stars

https://atcoder.jp/contests/abc303/tasks/abc303_e