abc399A

· · 个人记录

#include<bits/stdc++.h>
using namespace std;
long long read(){
    long long x=0,f=1;
    char ch=getchar();
    while(ch<'0'||ch>'9'){
        if(ch=='-'){
            f=-1;
        }
        ch=getchar();
    }
    while(ch>='0'&&ch<='9'){
        x=(x<<1)+(x<<3)+(ch^48);
        ch=getchar();
    }
    return x*f;
}
void write(long long x){
    if(x<0){
        putchar('-');
        x=-x;
    }
    if(x>9){
        write(x/10);
    }
    putchar(x%10+'0');
    return ;
}

int main(){
//  freopen(".in","r",stdin);
//  freopen(".out","w",stdout);
    int n=read();
    string s,t;
    cin>>s>>t;
    s=' '+s;
    t=' '+t;
    int sum=0;
    for(int i=1;i<=n;i++){
        if(s[i]!=t[i]){
            sum++;
        }
    }
    write(sum);
    return 0;
}