Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
93123 | 万隽宇 | 31忽略大小写的字符串比较 | C++ | Accepted | 1 MS | 272 KB | 613 | 2024-10-10 19:09:26 |
#include<iostream> // cin\cout\endl #include<cstring> // strcpy()\strcat()\strcmp()\strlen()\memset() using namespace std; string a; string b; int main(){ getline(cin,a); getline(cin,b); int len=a.length(); int d=b.length(); for(int i=0;i<len;i++){ if(a[i]>='A'&&a[i]<='Z'){ a[i]+=32; } } for(int i=0;i<d;i++){ if(b[i]>='A'&&b[i]<='Z'){ b[i]+=32; } } if(a>b){ cout<<'>'; } else if(a==b){ cout<<'='; } else{ cout<<'<'; } return 0; }