Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
104487 陈铎文 11石头剪刀布 C++ Compile Error 0 MS 0 KB 446 2025-01-05 11:02:25

Tests(0/0):


Code:

#include<bits/stdc++.h> using namespace std; int main(){ int a,b; cin>>a>>b; cout<<"winner:" if(a==0){ if(b==1) cout<<"1"; else cout<<"2"; } else if(a==1){ if(b==2) cout<<"1"; else cout<<"2"; } else{ if(b==0){ cout<<"1"; else cout<<"2"; } } return 0; }


Run Info:

Main.cc: In function 'int main()':
Main.cc:7:5: error: expected ';' before 'if'
     if(a==0){
     ^
Main.cc:13:5: error: 'else' without a previous 'if'
     else if(a==1){
     ^
Main.cc:22:9: error: expected '}' before 'else'
         else
         ^
Main.cc: At global scope:
Main.cc:26:5: error: expected unqualified-id before 'return'
     return 0;
     ^
Main.cc:27:1: error: expected declaration before '}' token
 }
 ^