Rosetta Problems

Remainder Minimization 2019

https://atcoder.jp/contests/abc133/tasks/abc133_c