| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 138566 | Kevin | 31忽略大小写的字符串比较 | C++ | Accepted | 0 MS | 268 KB | 478 | 2025-11-28 10:51:27 |
#include<bits/stdc++.h> using namespace std; int main(){ char s1[100],s2[100]; cin.getline(s1,100); cin.getline(s2,100); int len1=strlen(s1); int len2=strlen(s2); for(int i=0;i<len1;i++) { if(s1[i]>='A'&&s1[i]<='Z'){ s1[i]=s1[i]+32; } } for(int i=0;i<len2;i++) { if(s2[i]>='A'&&s2[i]<='Z'){ s2[i]=s2[i]+32; } } int n; n=strcmp(s1,s2); if(n==0){ cout<<'='; } else if(n>0){ cout<<'>'; } else cout<<'<'; return 0; }