| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 165028 | 格林老师 | 杀人游戏 | C++ | Compile Error | 0 MS | 0 KB | 448 | 2026-11-08 17:48:04 |
#include<bits/stdc++.h> using namespace std; int a[10001]={}; int main() { int n,m; cin>>n>>m; int pe=n; int i=0;num=0; while(pe>1) { i++; if(i>n) i=1; if(a[i]==0) { num++; if(num==m) { cout<<i<<" "; a[i]=1; num=0; pe--; } } } return 0; }
Main.cc: In function 'int main()':
Main.cc:9:13: error: 'num' was not declared in this scope
int i=0;num=0;
^