- 【基础题】百鸡问题
Rewgs
- 2023-9-2 15:41:09 @
#include<bits/stdc++.h> using namespace std; int main() { int a=100,g=0,m=0,x=0; for(g=0;a-g5>=0;g++) { for(m=0;a-g5-m2>=0;m++) { x=(a-(g5)-(m*3))*3; if(g+m+x==100) { cout<<g<<" "<<m<<" "<<x<<endl; } } } return 0; }
0 comments
No comments so far...
Information
- ID
- 208
- Time
- 1000ms
- Memory
- 256MiB
- Difficulty
- 9
- Tags
- # Submissions
- 167
- Accepted
- 36
- Uploaded By