https://www.acmicpc.net/problem/1075
#include <iostream>
using namespace std;
int main() {
int n, f;
cin >> n >> f;
n = n - n % 100;
for (int i = n; ; i++) {
if (i % f == 0)
{
if(i%100 <10)
cout << "0";
cout << i%100;
break;
}
}
}
'Programming > BaekJoon' 카테고리의 다른 글
[C++] 백준 14582번 : 오늘도 졌다 (0) | 2019.05.03 |
---|---|
[C++] 백준 10828번 : 스택 (0) | 2019.05.02 |
[C++] 백준 4948번 : 베르트랑 공준 (0) | 2019.04.14 |
[C++] 백준 2309번 : 일곱 난쟁이 (0) | 2019.04.12 |
[C++] 백준 1057번 : 토너먼트 (0) | 2019.04.03 |