Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
95471 冯诚阳 18排列骨头 C++ Wrong Answer 1 MS 260 KB 622 2024-10-27 19:34:24

Tests(0/1):


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 a[31]={0},hu=15,num=0,x=0; while(hu!=0){ x++; if(x==31) x=1; if(a[x]==1) continue; num++; if(num==9){ a[x]=1; num=1; hu--; } } for(int i=1;i<31;i++){ if(a[i]==0) cout<<i<<" "; } return 0; }


Run Info:

------Input------
0
------Answer-----
1 2 3 4 10 11 13 14 15 17 20 21 25 28 29
------Your output-----
2 5 7 8 11 14 15 16 18 22 23 26 27 28 29