Rosetta Problems

残り物には福がある

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