Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
69783 夏梓瑞 18排列骨头 C++ Compile Error 0 MS 0 KB 430 2024-04-06 15:19:18

Tests(0/0):


Code:

# include<iostream> using namespace std; int main(){ int a=0,k=1; int z[31]; for(int i=1;i>=30;i++){ a[i]=0; i=1;} while(k<15){ if(i>30) i=1; if(z[i]==0){ k++; if(z[i]==0){ a[i]=1; k=0; a++ }i++ } for(int i=1;i<=30;i++){ if(z[i]==0){ cout<<i;}} return 0; }


Run Info:

Main.cc: In function 'int main()':
Main.cc:8:12: error: invalid types 'int[int]' for array subscript
         a[i]=0;
            ^
Main.cc:11:12: error: 'i' was not declared in this scope
         if(i>30)
            ^
Main.cc:13:10: error: 'i' was not declared in this scope
     if(z[i]==0){
          ^
Main.cc:19:4: error: expected ';' before '}' token
    }i++
    ^
Main.cc:31:1: error: expected '}' at end of input
 }
 ^