Logo
(追記) (追記ここまで)

33253번 - Game Night 다국어

시간 제한메모리 제한제출정답맞힌 사람정답 비율
2 초 2048 MB1521088574.561%

문제

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ドル \leq n \leq 10^6,ドル the length of the passwords. Both passwords have the same length.
  • Two lines with each one password of length $n$. 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.

제한

예제 입력 1

6
nanana
batman

예제 출력 1

3

예제 입력 2

8
roasting
organist

예제 출력 2

0

힌트

출처

University > Delft University of Technology > Freshmen Programming Contest 2019 G번

(追記) (追記ここまで)

출처

대학교 대회

  • 사업자 등록 번호: 541-88-00682
  • 대표자명: 최백준
  • 주소: 서울시 서초구 서초대로74길 29 서초파라곤 412호
  • 전화번호: 02-521-0487 (이메일로 연락 주세요)
  • 이메일: contacts@startlink.io
  • 통신판매신고번호: 제 2017-서울서초-2193 호

AltStyle によって変換されたページ (->オリジナル) /