Problem O. S06-16穷举法

#include <bits/stdc++.h>
using namespace std;
int main() {
	for(int a=0; a<=25; a++) 
	{
		for(int b=0; b<34; b++) 
		{
			for(int c=0; c<=300; c++) 
			{
				if(a*5+b*3+c/3==100&&a+b+c==100&&a%2==0) 
				{
					cout<<a<<" "<<b<<" "<<c<<endl;
				}
			}
		}
	}
	return 0;
}```
posted @ 2022-10-03 15:41  131452lin  阅读(0)  评论(0)    收藏  举报