-Code
n = int(input())
before, after = list(input()), list(input())
for _ in range(n):
for i in range(len(before)):
if before[i] == '0':
before[i] = '1'
else:
before[i] = '0'
print("Deletion succeeded" if before == after else "Deletion failed")
문제 이해를 잘못해서 몇 번 다시 풀었습니다.
'Beakjoon&프로그래머스 > 파이썬' 카테고리의 다른 글
[백준/파이썬] 15813번 너의 이름은 몇 점이니? (0) | 2022.08.16 |
---|---|
[백준/파이썬] 20299번 3대 측정 (0) | 2022.08.15 |
[백준/파이썬] 21553번 암호 만들기 (0) | 2022.08.13 |
[백준/파이썬] 21964번 선린인터넷고등학교 교가 (0) | 2022.08.12 |
[백준/파이썬] 11284번 초성 중성 종성 (0) | 2022.08.11 |