Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
7531 詹梓涵 奇怪的国家 C++ Compile Error 0 MS 0 KB 338 2025-05-03 10:43:22

Tests(0/0):


Code:

#include<bits/stdc++.h> using namespace std; int main(){ char a1[51]={},a2[51]={},a3[53]={}; cin>>a1>>a2; int j; while(a1[j]!='\0'){ if(a1[j]==a2[j]){ a3[j]=1; } else{ a3[j]=0; } } } cout<<a3<<endl; return 0; }


Run Info:

Main.cc: In function 'int main()':
Main.cc:4:30: warning: variable 'a3' set but not used [-Wunused-but-set-variable]
     char a1[51]={},a2[51]={},a3[53]={};
                              ^
Main.cc: At global scope:
Main.cc:16:9: error: 'cout' does not name a type
         cout<a3<<endl;
         ^
Main.cc:17:5: error: expected unqualified-id before 'return'
     return 0;
     ^
Main.cc:18:1: error: expected declaration before '}' token
 }    
 ^