Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
135168 李馥甄 百钱买百鸡II C++ Accepted 3 MS 272 KB 313 2025-11-02 17:17:26

Tests(10/10):


Code:

#include <bits/stdc++.h> using namespace std; int main(){ int N; cin>>N; int cnt=0; for(int x=0;x<=N;x++){ for(int y=0;y<=N-x;y++){ int z=N-x-y; if(3*N==x*15+y*9+z){ cnt++; cout<<cnt<<": "<<x<<","<<y<<","<<z<<endl; } } } if(cnt==0){ cout<<"None"; } return 0; }