Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
128776 | 罗迎甲 | 杀人游戏 | C++ | Accepted | 3 MS | 268 KB | 549 | 2025-08-19 16:01:26 |
#include<iostream> // cin\cout\endl #include<cstdio> //scanf()\printf() #include<cstring> // strcpy()\strcat()\strcmp()\strlen()\memset() #include<cmath> //sqrt()\pow()\abs()\ceil()\floor()\max()\min() using namespace std; int main(){ int n,m,i,t=0,s=0,r=0; bool a[100]={0}; cin>>n>>m; while(r!=n-1){ t++; if(t>n)t=1; if(!a[t])s++; if(s==m){ s=0; cout<<t<<" "; a[t]=1; r++; } } return 0; }