Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
151701 任艺宸 31忽略大小写的字符串比较 C++ Accepted 1 MS 272 KB 707 2026-04-18 11:50:57

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