Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
113036 叶城俊 杀人游戏 C++ Accepted 1 MS 276 KB 326 2025-03-15 11:10:58

Tests(5/5):


Code:

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