CF1152C Neko does Maths
Problem
Neko has two integers \(a\) and \(b\). His goal is to find a non-negative integer \(k\) such that the least common multiple of \(a+k\) and \(b+k\) is the smallest possible. If there are multiple optimal integers \(k\), he needs to choose the smallest one.
Given his mathematical talent, Neko had no trouble getting Wrong Answer on this problem. Can you help him solve it?
找 \(k\ge 0\) 使 \(\min\operatorname{lcm}(a+k,b+k)\),若有多个 \(k\),取最小的。
\(1\le a,b\le10^9\)