Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
104739 | 万隽宇 | 杀人游戏 | C++ | Time Limit Exceeded | 1000 MS | 272 KB | 581 | 2025-01-09 19:17:08 |
#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; cin>>n>>m; int a[101]={0},b=0,t=0,c=0; while(b!=n-1){ c+=1; if(c>n){ c=1; } if(a[c]!=1){ t++; } if(t==m){ cout<<c; c=0; a[c]=1; b++; } } return 0; }