Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
119159 徐毅然 不吉利的数 C++ Wrong Answer 1 MS 272 KB 378 2025-05-17 09:30:03

Tests(0/10):


Code:

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


Run Info:

------Input------
4 500
------Answer-----
317
------Your output-----
1: 0,1,3