#include<stdio.h>
#include<stdlib.h>
#include<string.h>
long long int dollars[30001] = {0};
int i, j, money[] = {10000, 5000, 2000, 1000, 500, 200, 100, 50, 20, 10, 5};
int main()
{
dollars[0] = 1;
for (i = 0; i < 11; i ++)
for (j = money[i]; j <= 30000; j ++)
dollars[j] += dollars[j - money[i]];
int n, m ;
while (scanf("%d.%d", &n, &m) == 2)
{
if (n == 0 && m == 0) break;
printf("%3d.%02d%17lld\n", n, m, dollars[n * 100 + m]);
}
return 0;
}
回目錄
回首頁
沒有留言 :
張貼留言