Rosetta Problems

最小の和

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