Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
113027 刘济玮 杀人游戏 C++ Wrong Answer 0 MS 264 KB 347 2025-03-15 11:06:48

Tests(0/5):


Code:

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


Run Info:

------Input------
10 9
------Answer-----
9 8 10 2 5 3 4 1 6
------Your output-----
9 8 10 2 5 3 4 1 6 7