http://ac.jobdu.com/problem.php?pid=1045
#include<stdio.h>
int main(){
int x,y,z,n;
while(scanf("%d",&n)!=EOF){
for(x=0;x<=n/5;x++){
for(y=0;y<=n/3;y++){
for(z=0;z<=3*n;z++){
if(5*x+3*y+(double)z/3<=n && x+y+z==100){ // 注意数据类型(double)
printf("x=%d,y=%d,z=%d\n",x,y,z);
}
}
}
}
}
system("pause");
return 0;
}