#D. A - Find Multiple

    传统题 1000ms 256MiB

A - Find Multiple

该比赛已结束,您无法在比赛模式下递交该题目。您可以点击“在题库中打开”以普通模式查看和递交本题。

A - Find Multiple

Score : $100$ points

Problem Statement

Print a number between $A$ and $B$ (inclusive) that is a multiple of $C$.

If there is no such number, print -1.

Constraints

  • $1 \leq A \leq B \leq 1000$
  • $1 \leq C \leq 1000$
  • All values in input are integers.

Input

Input is given from Standard Input in the following format:

AA BB CC

Output

Print the answer.
If there is no number with the desired property, print -1.


123 456 100
200

300 or 400 would also be accepted.


630 940 314
-1

2025寒假ATC码力训练营第三次练习

未参加
状态
已结束
规则
IOI
题目
6
开始于
2025-1-20 13:00
结束于
2025-1-20 14:30
持续时间
1.5 小时
主持人
参赛人数
6