100 atcoder#ABC133C. [ABC133C] Remainder Minimization 2019
[ABC133C] Remainder Minimization 2019
Score : points
Problem Statement
You are given two non-negative integers and . We will choose two integers and such that . Find the minimum possible value of .
Constraints
- All values in input are integers.
Input
Input is given from Standard Input in the following format:
Output
Print the minimum possible value of when and are chosen under the given condition.
2020 2040
2
When , .
4 5
20
We have only one choice: .