Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
70964 孙诗皓 字符串相等判断 C++ Accepted 1 MS 276 KB 385 2024-04-20 17:00:27

Tests(10/10):


Code:

#include <iostream> #include<cmath> using namespace std; int main() { string a,b; int len,len1; cin>>a>>b; len=a.size(); len1=b.size(); if(len1>len) len=len1; for(int i=0;i<len;i++) { if(a[i]!=b[i]) { cout<<"no"; return 0; } } cout<<"yes"; return 0; }