Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
128791 罗迎甲 猴子选大王 C++ Compile Error 0 MS 0 KB 591 2025-08-19 17:02:43

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,f=0,t=0,i=0; bool a[301]={}; cin>>n>>m; while(f){ if(!a[r])s++; t++; if(t>n)t=1; if(!a[t])s++; if(s==m){ s=0; a[i]=!a[i]; f--; } } i++; i%1=n; } i=0; while(a[i++]); cout<<i; return 0; }


Run Info:

Main.cc: In function 'int main()':
Main.cc:12:15: error: 'r' was not declared in this scope
         if(!a[r])s++;
               ^
Main.cc:12:18: error: 's' was not declared in this scope
         if(!a[r])s++;
                  ^
Main.cc:15:18: error: 's' was not declared in this scope
         if(!a[t])s++;
                  ^
Main.cc:16:12: error: 's' was not declared in this scope
         if(s==m){
            ^
Main.cc:23:12: error: lvalue required as left operand of assignment
         i%1=n;
            ^
Main.cc: At global scope:
Main.cc:25:2: error: 'i' does not name a type
  i=0;
  ^
Main.cc:26:2: error: expected unqualified-id before 'while'
  while(a[i++]);
  ^
Main.cc:27:2: error: 'cout' does not name a type
  cout<