AtCoder Beginner Contest 133
翻译中…
Problem Statement
翻译中…
You are given two non-negative integers $L$ and $R$. We will choose two integers $i$ and $j$ such that $L \leq i < j \leq R$. Find the minimum possible value of $(i \times j) \text{ mod } 2019$.
翻译中…
Constraints
翻译中…
- All values in input are integers.
$0 \leq L < R \leq 2 \times 10^9$
翻译中…
Input
翻译中…
Input is given from Standard Input in the following format:
翻译中…
L R
翻译中…
Output
翻译中…
Print the minimum possible value of $(i \times j) \text{ mod } 2019$ when $i$ and $j$ are chosen under the given condition.
翻译中…
样例
Input #1
2020 2040
Output #1
2
When $(i, j) = (2020, 2021)$, $(i \times j) \text{ mod } 2019 = 2$.
Input #2
4 5
Output #2
20
We have only one choice: $(i, j) = (4, 5)$.
题目信息
题面与样例版权归 AtCoder 及出题人所有;中文翻译由 AI 生成(CI 管线),如有出入请以原文为准。