Game Night

시간 제한2초메모리 제한2048 MB

요약
길이가 같은 두 소문자 문자열이 주어질 때, 새 비밀번호에 필요하지만 기존 비밀번호에서 재사용할 수 없는 글자 수를 센다.
난이도

쉬움10점 중 2점

유형
해시맵, 문자열
정답자
아직 제출이 없습니다

문제

Every Saturday, Geronimo is organizing a game night for all his friends. One after the other, his friends keep asking him for his Wi-Fi password. Because Geronimo has many friends and does not want to be continuously disturbed just to share his password, he decides to grab an old box of fridge magnets that have the shape of letters, and spells out the password on the fridge.

Since Geronimo cares about the security of his Wi-Fi network, he wants to change the Wi-Fi password after the game night, to make sure that his password is not shared with strangers who will then use his network. However, that means he also has to update the password displayed on the fridge. The box with fridge magnets is a complete mess, so Geronimo does not want to spend too much time searching through the box for the right letters, especially when a new password contains some letters that were also in the old password.

Given Geronimo's old and new Wi-Fi password, can you calculate how many letters he has to search for in the box to spell out the new password on the fridge?

입력

  • One line with one integer: 1≤n≤1061 \leq n \leq 10^6, the length of the passwords. Both passwords have the same length.
  • Two lines with each one password of length nn. The passwords only contain lowercase letters ('a' through 'z').

출력

One line, containing one integer: the number of letters that cannot be re-used between the two passwords.

예제2

  1. 예제 1

    입력
    6
    nanana
    batman
    
    예상 출력
    3
    
  2. 예제 2

    입력
    8
    roasting
    organist
    
    예상 출력
    0