Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
7011 | 黄言岐 | 不吉利的数 | C++ | Wrong Answer | 0 MS | 260 KB | 593 | 2025-03-29 15:40:43 |
#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,d=0,z=0; cin>>n; for(int x=0;x<=n/5;x++){ for(int y=0;y<=n/3;y++){ z=n-x-y; if(5*x+3*y+z/3==n&&x+y+z==n&&z%3==0){ cout<<++d<<": "<<x<<","<<y<<","<<z<<endl; } } } if(d==0){ cout<<"none"; } return 0; }
------Input------
1 999999
------Answer-----
499120
------Your output-----
none