Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
95484 罗子童 18排列骨头 C++ Accepted 1 MS 268 KB 645 2024-10-27 19:56:23

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