0
1
mirror of https://git.sb/baoshuo/OI-codes.git synced 2024-09-19 23:45:25 +00:00

A - Find Multiple

https://atcoder.jp/contests/abc220/submissions/26138017
This commit is contained in:
Baoshuo Ren 2021-09-26 20:18:08 +08:00 committed by Baoshuo Ren
parent 6451ba462c
commit 6624bda3c4
Signed by: baoshuo
GPG Key ID: 70F90A673FB1AB68

17
AtCoder/ABC220/A/A.cpp Normal file
View File

@ -0,0 +1,17 @@
#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;
}