Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
76715 程余天皓 环形密码 C++ Time Limit Exceeded 1000 MS 268 KB 353 2024-06-02 16:49:13

Tests(0/10):


Code:

#include<bits/stdc++.h> using namespace std; int main() { int n,m; cin>>n>>m; int s[n+1]={0}; int sr=0; int r=0,b=0; while(sr=n-1){ r++; if(r>n){ r=1; } if(s[r]==0){ b++; if(b==m){ cout<<r<<" "; s[r]=1; b=0; sr++; } } } return 0; }