| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 81015 | 李雨昊 | 环形密码 | C++ | Wrong Answer | 1 MS | 268 KB | 274 | 2024-07-12 08:41:50 |
#include<iostream> using namespace std; int a[1005]; int main(){ int n,m; cin>>n>>m; int cnt=0,t=0,i=1; while(cnt<n){ if(a[i]==0){ t++; if(t==m){ cnt++; cout<<i<<" "; a[i]=1; t=0; } } i++; if(i>n){ i=1; } } }
------Input------
10 3 8 3 6 3 4 10 3 10 3 2
------Answer-----
6 3 3 10 8 3 3 2 10 4
------Your output-----
3 6 9 2 7 1 8 5 10 4