0
1
mirror of https://git.sb/baoshuo/OI-codes.git synced 2024-11-30 21:16:27 +00:00
OI-codes/AtCoder/ABC220/A/A.cpp

18 lines
268 B
C++

#include <bits/stdc++.h>
using namespace std;
int a, b, c;
int main() {
cin >> a >> b >> c;
for (int i = a; i <= b; i++) {
if (i % c == 0) {
cout << i << endl;
exit(0);
}
}
cout << -1 << endl;
return 0;
}