1 solutions

  • 0
    @ 2024-12-4 19:37:03

    C++ :

    #include<iostream>
    using namespace std;
    int main()
    {
    	for (int cock=0; cock<=20; cock++)
    		for (int hen=0; hen<=33; hen++)
    		{
    			int chicken=100-cock-hen;
    			if (chicken%3==0 && 5*cock+3*hen+chicken/3==100)
    				cout<<cock<<" "<<hen<<" "<<chicken<<endl;
    		}
    	return 0;
    }
    
    • 1

    Information

    ID
    2263
    Time
    1000ms
    Memory
    128MiB
    Difficulty
    (None)
    Tags
    # Submissions
    0
    Accepted
    0
    Uploaded By