Run ID | Author | Problem | Lang | Verdict | Time | Memory | Code Length | Submit Time |
---|---|---|---|---|---|---|---|---|
37575 | zhouhuanyu 玙静 | 忽略大小写的字符串比较 | C++ | Compile Error | 0 MS | 0 KB | 432 | 2024-01-21 20:04:12 |
#include <bits/stdc++.h> using namespace std; int main(){ string a, b; getline(cin, a); getline(cin, b); strlwr(a); strlwr(b); int flag = 0; for(int i = 0; i < min(strlen(a), strlen(b)); i++){ if(a[i] == b[i]){ flag = 1; }else if(a[i] > b[i]){ flag = 2; }else{ flag = 3; } } if(flag == 1){ cout << "="; }else if(flag == 2){ cout << ">"; }else{ cout << "<"; } return 0; }