Run ID Author Problem Lang Verdict Time Memory Code Length Submit Time
47081 zhangrongbao2023 练39.4 百钱买百鸡 C++ No Test Data 0 MS 0 KB 346 2024-05-12 13:56:42

Tests(0/0):


#include<iostream> using namespace std; int main() { int s=100; int g,m,x; printf("5%c5%c5%c\n","公鸡","母鸡","小鸡"); for(int i=1;i<=100/3;i++){ for(int j=1;j<=s-i;j++){ for(int k=1;k<=s-i;k++){ if(i*3+j*2+k/3==100&&(i+j+k)==100){ cout<<i<<" "<<j<<" "<<k<<" "<<endl; } } } } }