陈大师真强哈^
第四道做起来没那么简洁
#include <stdio.h>
main()
{
int n,fen1,fen2,fen5,count=0;
scanf("%d",&n);
for(fen5=1;fen5<=20;fen5++)
for(fen2=1;fen2<=50;fen2++)
for(fen1=1;fen1<=100;fen1++)
if(5*fen5+2*fen2+fen1==n)
count++;
printf("count=%d\n",count);
for(fen5=1;fen5<=20;fen5++)
for(fen2=1;fen2<=50;fen2++)
for(fen1=1;fen1<=100;fen1++)
if(5*fen5+2*fen2+fen1==n)
printf("fen5:%d fen2:%d fen1:%d\n",fen5,fen2,fen1);
}