Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
135888 鲁博睿 31忽略大小写的字符串比较 C++ Accepted 2 MS 276 KB 428 2025-11-08 16:58:39

Tests(10/10):


Code:

#include <bits/stdc++.h> ? using namespace std; int main() { string a,b; getline(cin,a); getline(cin,b); int a1=a.size(); int b1=a.size(); int c; for(int i=0;i<a1;i++){ if(a[i]>='A'&&a[i]<='Z'){ a[i]+= 32; } } for(int i=0;i<b1;i++){ if(b[i]>='A'&&b[i]<='Z'){ b[i]+= 32; } } if(a==b) cout<<"="<<endl; else if(a<b) cout<<"<"<<endl; else if(a>b) cout<<">"<<endl; return 0; }