| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 125029 | 晏莞煜 | 奇怪的国家 | C++ | Wrong Answer | 0 MS | 268 KB | 557 | 2025-07-13 09:59:15 |
#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 a[i]==1){ cout<<"0"; }else{ if(a[i]==0 and b[i]==0){ cout<<"1"; } } } } } return 0; }
------Input------
10110100100100010000 10101100010101011100
------Answer-----
11100111001110110011
------Your output-----