Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
64795 祝家懿 百钱买百鸡II C++ Time Limit Exceeded 1000 MS 272 KB 361 2024-01-21 17:48:05

Tests(4/10):


Code:

#include<bits/stdc++.h> using namespace std; int main() { int n,q,x=1; cin>>n; for(int f=0; f<=n; f++) { for(int z=0; z<=n; z++) { for(int u=0; u<=n; u++) { if(n==f*5+z*3+u/3*1&&n==f+z+u&&u%3==0) { cout<<x<<":"<<" "<<f<<","<<z<<","<<u<<endl; x++; } } } } if(x==1){ cout<<"None"; } return 0; }