Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
3757 杨洋杰 杀人游戏 C++ Accepted 0 MS 268 KB 346 2024-06-30 12:01:23

Tests(5/5):


Code:

#include<cstdio> #include<iostream> using namespace std; int main(){ int n,m,s=0; scanf("%d%d",&n,&m); bool visit[200]={0}; for(int k=0;k<n-1;k++){ for(int i=0;i<m;i++){ if(++s>n) s=1; if(visit[s]) i--; } printf("%d ",s); visit[s]=true; } return 0; }