기준이 되는 배열을 먼저 초기화 해 둔 후
입력받은 배열과 차이를 출력하면 됨
arr = [1, 1, 2, 2, 2, 8]
A = input().split()
count = 0
for i in arr:
print(int(i) - int(A[count]), end=" ")
count += 1
'백준 > 심화 1' 카테고리의 다른 글
백준 - 2444 (python) (0) | 2024.02.13 |
---|---|
백준 - 25083 (python) (0) | 2024.02.13 |