#include<stdio.h>
int main(void){
int cent50,cent25,cent10,cent5,cent1,i,j,k,l,m,n,way;
while(scanf("%d",&n)!=EOF){
way=0;
cent50=n/50;
cent25=n/25;
cent10=n/10;
cent5=n/5;
cent1=n/1;
for(i=0;i<=cent50;i++){
for(j=0;j<=cent25;j++){
for(k=0;k<=cent10;k++){
for(l=0;l<=cent5;l++){
for(m=0;m<=cent1;m++){
if((i*50+j*25+k*10+l*5+m)==n&&(i+j+k+l+m<=100))
way++;
}
}
}
}
}
printf("%d\n",way);
}
return 0;
}
HDU-2069
最新推荐文章于 2021-05-28 20:01:20 发布