Need help in a problem
I was solving a problem and it led to a sub problem which goes like:
given A,B>0, minimise: 2*x+B%(A+x) , x>=0
Codeforces Round 1123 Solution Discussion