| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 163598 | 格林老师 | 18排列骨头 | C++ | Accepted | 1 MS | 260 KB | 479 | 2026-10-26 20:38:17 |
#include <bits/stdc++.h> using namespace std; int a[1001]; int main() { int i; for (i=1;i<=30;i++){ a[i]=1; } int n=30,num=0; i=1; while (n>15){ if (a[i]){ num++; if (num==9){ a[i]=0; n--; num=0; } } i++; if (i>30) i=1; } for (i=1;i<=30;i++){ if (a[i]) cout<<i<<" "; } return 0; }