728x90
8371번: Dyslexia
In the recent years children in Byteland have been hardly reading any books. This has a negative influence on the knowledge of orthography among Byteland residents. Teachers at schools do their best to change this situation. They organize many different te
www.acmicpc.net
문제 풀이
길이가 같은 두 문자열이 주어졌을 때, 같은 위치의 문자가 다른 경우의 갯수를 출력해준다.
정답 코드
n = int(input())
s1 = input()
s2 = input()
ans = 0
for i in range(n) :
if s1[i] != s2[i] : ans += 1
print(ans)
728x90
'Algorithm > PS' 카테고리의 다른 글
[BOJ/백준] 8574 - Ratownik [python] (0) | 2023.03.20 |
---|---|
[BOJ/백준] 8387 - Dyslexia [python] (0) | 2023.03.20 |
[BOJ/백준] 7947 - Koncert [python] (0) | 2023.03.20 |
[BOJ/백준] 7782 - Alien [python] (0) | 2023.03.20 |
[BOJ/백준] 7581 - Cuboids [python] (1) | 2023.03.20 |