VioletaBabel

1075번: 나누기 본문

백준/백준-C
1075번: 나누기
Beabletoet 2017. 5. 20. 00:46

#include <stdio.h>

int main()

{

int n, f;

scanf("%d %d", &n, &f);

for (int i = n - (n % 100), max = i+100; i <= max; ++i)

if (i%f == 0)

{

n = i;

break;

}

if (n % 100 < 10)

printf("0");

printf("%d", n%100);

}

'백준 > 백준-C' 카테고리의 다른 글

14584번: 암호 해독  (0) 2017.05.21
14582번: 오늘도 졌다  (0) 2017.05.20
2607번: 비슷한 단어  (0) 2017.05.16
9426번: 중앙값 측정 (실패)  (0) 2017.05.15
2839번: 설탕 배달  (0) 2017.05.14
Comments