Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
139173 郝王骏程 环形密码 C++ Compile Error 0 MS 0 KB 725 2025-12-01 21:09:01

Tests(0/0):


Code:

#include<iostream> // cin\cout\endl #include<cstdio> //scanf()\printf() #include<cstring> // strcpy()\strcat()\strcmp()\strlen()\memset() #include<cmath> //sqrt()\pow()\abs()\ceil()\floor()\max()\min() using namespace std; int main(){ int n,m,a[101],s=0,num=0; cin>>n>>m; for(int i=;i<=n;i++){ cin>>a[i]; int j=; while(s<n){ if(a[j]!=0){ num++; if(num==m){ cout<<a[j]<<" "; m=a[j]; a[j]=0; num=0; s++; } } } j++ if(j>n) j=1; } return 0; }


Run Info:

Main.cc: In function 'int main()':
Main.cc:10:15: error: expected primary-expression before ';' token
     for(int i=;i<=n;i++){
               ^
Main.cc:12:15: error: expected primary-expression before ';' token
         int j=;
               ^
Main.cc:26:9: error: expected ';' before 'if'
         if(j>n)
         ^