Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
122166 | 林嘉乐 | 31忽略大小写的字符串比较 | C++ | Accepted | 1 MS | 276 KB | 756 | 2025-06-14 17:27:37 |
#include<iostream> // cin\cout\endl #include<cstdio> //scanf()\printf() #include<cstring> // strcpy()\strcat()\strcmp()\strlen()\memset() #include<cmath> //sqrt()\pow()\abs()\ceil()\floor()\max()\min() using namespace std; int main(){ string a; string b; getline(cin,a); getline(cin,b); int a1=a.length(); int b1=b.length(); for(int i=0;i<a1;i++){ if(a[i]>='A'&&a[i]<='Z'){ a[i]=a[i]+32; } } for(int i=0;i<b1;i++){ if(b[i]>='A'&&b[i]<='Z'){ b[i]=b[i]+32; } } if(a==b){ cout<<'='<<endl; } else if(a>b){ cout<<'>'<<endl; } else if(a<b){ cout<<'<'<<endl; } return 0; }