1 solutions

  • 0
    @ 2023-12-22 14:26:22
    #include <iostream>
    #include <bits/stdc++.h>
    using namespace std;
    int main()
    {
    	string a,b;
    	getline(cin,a);
    	getline(cin,b);
    	int flag;
    	int len1 = a.length();
    	int len2 = b.length();
    	if(len1 == len2){
    		for(int i = 0 ;i < len1 ;i++){
    			if(a[i] != b[i]){
    				if(a[i] + 32 == b[i] || a[i] - 32 == b[i]){
    					flag = 3;
    				}else{
    					flag = 4;
    				}
    			}
    		}
    		if(a==b){
    			flag = 2;
    		}
    	}else{
    		flag = 1;
    	}
    	cout << flag;
    	return 0;
    }
    
    • 1

    Information

    ID
    1824
    Time
    1000ms
    Memory
    512MiB
    Difficulty
    10
    Tags
    # Submissions
    4
    Accepted
    4
    Uploaded By