和uva647基本一样,注意精度
#include <bits/stdc++.h>
using namespace std;
const int MAXN = 33333;
int w[11] = {5,10,20,50,100,200,500,1000,2000,5000,10000};
int W;
long long dp[MAXN];
void solve()
{
memset(dp,0,sizeof(dp));
dp[0] = 1;
for(int i = 0; i < 11; ++i)
{
for(int j = w[i]; j <= W; ++j)
{
dp[j] += dp[j-w[i]];
}
}
}
int main()
{
double money;
while(cin >> money && money != 0.0)
{
W = int(money*100.0+0.5);
solve();
cout.width(6);
cout << fixed << setprecision(2) << money;
cout.width(17);
cout << dp[W] <<endl;
}
return 0;
}