You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
26 lines
607 B
26 lines
607 B
#include <bits/stdc++.h>
|
|
|
|
using namespace std;
|
|
string a, b;
|
|
|
|
bool check(string a, string b) {
|
|
for (int i = 0; i < a.size(); i++) {
|
|
if (a[i] >= 'A' && a[i] <= 'Z') a[i] = a[i] + 32;
|
|
if (b[i] >= 'A' && b[i] <= 'Z') b[i] = b[i] + 32;
|
|
if (a[i] != b[i]) return false;
|
|
}
|
|
return true;
|
|
}
|
|
|
|
int main() {
|
|
cin >> a >> b;
|
|
if (a.size() != b.size())
|
|
cout << 1 << endl;
|
|
else if (a == b)
|
|
cout << 2 << endl;
|
|
else if (a.size() == b.size() && check(a, b))
|
|
cout << 3 << endl;
|
|
else
|
|
cout << 4 << endl;
|
|
return 0;
|
|
} |