Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
102159 | 糜宗易 | 计算平均数 | C++ | Compile Error | 0 MS | 0 KB | 487 | 2024-12-21 12:15:19 |
#include<bits/stdc++.h> using namespace std; const int N=1e6+10; int n,t; bool vis[N]; void deal(int m) { int tot=n; int p=0; for(int i=1;tot>1;i++) { if(i>n) i=1; if(vis[i]) continue; if(++p==m) { p=0; vis[i]=1; tot--; cout<<i<<" "; } } } int main() { cin>>n>>t; deal(t); return 0; } /*for(int i=1;i<=n;i++) if(!vis[i]) { printf("%d\n",i); return ; }
Main.cc:29:1: error: unterminated comment /*for(int i=1;i<=n;i++) ^