Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
164168 余建成 杀人游戏 C++ Accepted 9 MS 272 KB 272 2026-11-01 10:21:36

Tests(5/5):


Code:

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