Programming/Python & Data Structures
[Baekjoon/Python3] 9243번 파일 완전 삭제
HooNeee
2020. 12. 5. 22:09
[Baekjoon/Python3] 9243번 파일 완전 삭제
9243번: 파일 완전 삭제
첫째 줄에 N이 주어진다. (1 ≤ N ≤ 20) 둘째 줄에는 파일을 삭제하기 전에 파일이 있었던 곳의 비트가 주어지고, 셋째 줄에는 삭제한 후에 비트가 주어진다. 비트는 0과 1로만 이루어져 있고, 두
www.acmicpc.net
n = int(input())
before = list(map(int, input()))
after = list(map(int, input()))
if n % 2:
for i in range(len(before)):
if before[i] == 0:
before[i] = 1
else:
before[i] = 0
if before == after:
print('Deletion succeeded')
else:
print('Deletion failed')