Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
133192 令狐文丽 杀人游戏 C++ Accepted 1 MS 276 KB 318 2025-10-16 18:06:08

Tests(5/5):


Code:

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