Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
120585 翁思宸 18排列骨头 C++ Accepted 1 MS 260 KB 616 2025-05-30 19:50:30

Tests(1/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=0,cut=0,i; for(i=1;hu<15;i++){ if(i>30){ i=1; } if(a[i]==0){ cut++; } if(cut==9){ hu++; a[i]=1; cut=0; } } for(i=1;i<=30;i++){ if(a[i]==0){ cout<<i<<" "; } } return 0; }