Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
80827 何思佳 18排列骨头 C++ Wrong Answer 0 MS 268 KB 544 2024-07-11 16:31:58

Tests(0/1):


Code:

#include<bits/stdc++.h> using namespace std; int main() { int n,m; int i=0,t=0; int a[1001]={0}; cin>>n>>m; int c=n; while(c>0) { i++; if(i>n) { i=1; } if(a[i]==0) { t++; if(t==m) { a[i]=1; t=0; c--; cout<<i<<" "; } } } return 0; }


Run Info:

------Input------
0
------Answer-----
1 2 3 4 10 11 13 14 15 17 20 21 25 28 29
------Your output-----