| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 82466 | 张黄源 | 31忽略大小写的字符串比较 | C++ | Compile Error | 0 MS | 0 KB | 432 | 2024-07-13 11:34:10 |
#include<bits/stdc++.h> using namespace std; int main() { string a,b; getline(cin,a); getline(cin,b); for(int i=0; i<a.size(); i++) { if(a[i]>='A'&&a[i]<='Z') { a[i] += 32; } } for(int i=0; i<b.size(); i++) { if(b[i]>='A'&&b[i]<='Z') { b[i] += 32; } } if(a>b) { cout<<">"; break; } else if(a<b) { cout<<"<"; break; } else { cout<<"="; break; } return 0; }
Main.cc: In function 'int main()': Main.cc:7:16: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for(int i=0; i