Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
112141 张之隽 环形密码 C++ Compile Error 0 MS 0 KB 321 2025-03-08 14:58:59

Tests(0/0):


Code:

#include<iostream> using namespace std; int a[1001] int main(){ int n,m; cin >> n >> m; int cnt = 0,t = 0,i = 0; 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; } } return 0; }


Run Info:

Main.cc:4:1: error: expected initializer before 'int'
 int main(){ 
 ^