674
/*
这题相对比较水 算 用5面值的 货币拼成 固定的面值的 有多少种方法
*/
#include <iostream>
#include <string.h>
#include <cstdio>
using namespace std;
long long dp[10000];
int C[]={50,25,10,5,1};
int main()
{
int N;
while(scanf("%d",&N)==1){
memset(dp,0,sizeof(dp));
dp[0]=1;
for(int i=0;i<5;i++)
for(int j=C[i];j<=N;j++)
dp[j]=dp[j-C[i]]+dp[j];
cout<<dp[N]<<endl;
}
return 0;
}

浙公网安备 33010602011771号