Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
164152 李沐阳 杀人游戏 C++ Accepted 1 MS 272 KB 273 2026-11-01 10:00:24

Tests(5/5):


Code:

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