#include <stdio.h>
int main() {
    int alp[26]={0};
    char str1[1001],str2[1001];
    int total=0;
    scanf("%s %s",str1, str2);
    for(int i=0; str1[i]!=0; i++) {
        int idx=str1[i]-'a';
        alp[idx]+=1;
    }
    for(int i=0; str2[i]!=0; i++) {
        int idx=str2[i]-'a';
            alp[idx]-=1;
    }
    for(int i=0;i <26; i++) {
        if(alp[i]>0) total+=alp[i];
        else total-=alp[i];
    }
    printf("%d",total);
    return 0; 
}

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: