[C++] 纯文本查看 复制代码 #include<bits/stdc++.h>
using namespace std;
int x,y,z,t;
int main()
{
for(x=0;x<=100/5;x++)
{
for(y=0;y<=100/3;y++)
{
for(z=0;z<=100*3;z++)
{
t++;
if(x+y+z==100&&5*x+3*y+z/3.0==100)
{
cout<<x<<" "<<y<<" "<<z<<endl;
}
}
}
}
cout<<t;
return 0;
} |