#include <stdio.h>
int coin[9]={10,50,100,500,1000,5000,10000,50000};
int main()
{
int M;
scanf("%d",&M);
int a = 0;
for(int i = 7;i >= 0;i--){
a = a + M / coin[i];
M = M % coin[i];
}
printf("%d",a);
}
top of page

기능을 테스트하려면 라이브 사이트로 이동하세요.
거스름돈 |
거스름돈 |
댓글 0개
좋아요
댓글(0)
bottom of page