Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
113040 邹昊辰 杀人游戏 C++ Accepted 1 MS 264 KB 350 2025-03-15 11:17:02

Tests(5/5):


Code:

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