Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
152067 黄俊然 31忽略大小写的字符串比较 C++ Accepted 1 MS 276 KB 691 2026-04-19 15:16:53

Tests(10/10):


Code:

#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,b; int n; getline(cin,a); getline(cin,b); for(int i=0;i<a.length();i++){ if(a[i]>='A' && a[i]<='Z'){ a[i]+=32; } } for(int i=0;i<b.length();i++){ if(b[i]>='A' && b[i]<='Z'){ b[i]+=32; } } if(a>b){ cout<<">"; } if(a==b){ cout<<"="; }if(a<b){ cout<<"<"; } return 0; }