mirror of
https://git.sb/baoshuo/OI-codes.git
synced 2024-11-10 04:38:48 +00:00
A - Find Multiple
https://atcoder.jp/contests/abc220/submissions/26138017
This commit is contained in:
parent
6451ba462c
commit
6624bda3c4
17
AtCoder/ABC220/A/A.cpp
Normal file
17
AtCoder/ABC220/A/A.cpp
Normal 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;
|
||||
}
|
Loading…
Reference in New Issue
Block a user