Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
62422 祝家懿 奇怪的国家 C++ Compile Error 0 MS 0 KB 252 2023-12-23 17:06:08

Tests(0/0):


Code:

# include<iostream> # include<cstring> using namespace std; int main(){ string s,x; cin>>s>>x; n=s.size(); for(int i=0;i<n){ if(s[i]==x[i]){ cout<<"1"; } else if(s[i]>x[i]||s[i]<x[i]){ cout<<"0"; } } return 0; }


Run Info:

Main.cc: In function 'int main()':
Main.cc:7:2: error: 'n' was not declared in this scope
  n=s.size(); 
  ^
Main.cc:8:17: error: expected ';' before ')' token
  for(int i=0;i