Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
125032 | 晏莞煜 | 奇怪的国家 | C++ | Accepted | 0 MS | 280 KB | 573 | 2025-07-13 10:02:48 |
#include<iostream> #include<cstring> using namespace std; int main(){ //strcpy( , ) 将字符数组~复值给~ //strcat( , ) 字符数组拼接 //strcmp(a,b) a>b cout<<"1" a==b cout<<"0" a<b cout<<"-1"; char a[50],b[50]; cin>>a>>b; int q=strlen(a); for(int i=0;i<q;i++){ if(a[i]=='1' and b[i]=='1'){ cout<<"1"; }else{ if(a[i]=='1' and b[i]=='0'){ cout<<"0"; }else{ if(a[i]=='0' and b[i]=='1'){ cout<<"0"; }else{ if(a[i]=='0' and b[i]=='0'){ cout<<"1"; } } } } } return 0; }