Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
164151 孔声豪 杀人游戏 C++ Accepted 1 MS 272 KB 248 2026-11-01 09:58:54

Tests(5/5):


Code:

#include<bits/stdc++.h> using namespace std; int main() { int n,m,sr=0; bool j[101]={}; cin>>n>>m; int i=0,bs=0; while(sr!=n-1){ i++; if(i>n)i=1; if(!j[i])bs++; if(bs==m){ bs=0; j[i]=true; sr++; cout<<i<<' '; } } return 0; }