Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
163090 令狐文丽 18排列骨头 C++ Accepted 1 MS 252 KB 511 2026-10-24 13:56:17

Tests(1/1):


Code:

#include<bits/stdc++.h> using namespace std; int a[31];//0没取 1取了0 //main外面系统赋值0 int main(){ //系统赋值 赋值随机 int n=0,j=1,sum=0;//n 1-9 j 1-30 sum=0 总数 while(sum<15){ // 1 2 3 4 5 6 7 8 9 10 11 12 29 30 if(a[j]==0){ n++; if(n==9){ sum++;// a[j]=1; n=0; } } //找下一个下标 if(j==30){ j=1; }else{ j++; } } for(int i = 1;i<=30;i++){ if(a[i]==0) cout<<i<<" "; } return 0; }