Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
128775 | 林嘉乐 | 杀人游戏 | C++ | Accepted | 2 MS | 272 KB | 261 | 2025-08-19 16:00:33 |
#include<bits/stdc++.h> using namespace std; int main() { int n,m,i,t=0,s=0,f=0; bool a[101]={0}; cin>>n>>m; while(f!=n-1){ t++; if(t>n)t=1; if(!a[t])s++; if(s==m){ s=0; cout<<t<<" "; a[t]=1; f++; } } return 0; }