Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
117929 吴诗涵 百钱买百鸡II C++ Output Limit Exceeded 5 MS 280 KB 571 2025-04-20 19:14:46

Tests(0/10):


Code:

#include<iostream> // cin\cout\endl #include<cstdio> //scanf()\printf() #include<cstring> // strcpy()\strcat()\strcmp()\strlen()\memset() #include<cmath> //sqrt()\pow()\abs()\ceil()\floor()\max()\min() using namespace std; int main(){ int n,cnt=0; cin>>n; for(int i=0;i<=n/5;i++){ for(int j=0;j<=n/3;j++){ for(int k=0;k<=n/3;k++){ if(i+j+k*3==n&&5*i+3*j+k==n){ cnt++; } cout<<cnt<<" "<<":"<<" "<<i<<","<<3*k<<endl; } } } if(cnt==0)cout<<"None"<<endl; return 0; }