백준 1075 c

magicdrill·2024년 2월 23일
0

백준 문제풀이

목록 보기
24/655

백준 1075 c

#include <stdio.h>

#pragma warning (disable:4996)

int main(void)
{
	int N, F;
	int temp;

	scanf("%d %d", &N, &F);

	temp = N % 100;
	temp = N - temp;
	if (temp % F == 0)
	{
		printf("00");
	}
	else
	{
		temp = temp / F;
		temp++;
		temp = temp * F;
		temp = temp % 100;
		if (temp < 10)
		{
			printf("0%d\n", temp);
		}
		else
		{
			printf("%d\n", temp);
		}
	}
	
	return 0;
}

0개의 댓글