Run ID 作者 问题 语言 测评结果 时间 内存 代码长度 提交时间
40470 奚晨瑞 字符串判等 C++ 解答错误 0 MS 248 KB 363 2024-02-10 21:20:05

Tests(0/1):


#include<iostream> #include<cstring> using namespace std; char a[1000],b[1000]; int main() { gets(a); gets(b); if(strlen(a)==strlen(b)){ bool yes=0; for(int i=0;i<strlen(a);i++){ if(a[i]!=b[i]){ yes=1; break; } } if(yes==0){ cout<<"YES"; } else{ cout<<"NO"; } } else{ cout<<"NO"; } return 0; }


测评信息: