Skip to content

Latest commit

 

History

History
17 lines (11 loc) · 264 Bytes

1551.md

File metadata and controls

17 lines (11 loc) · 264 Bytes

1551

Python

# pairwise 연습하기
from itertools import pairwise

N, K = map(int, input().split())
lst = list(map(int, input().split(',')))

for _ in range(K):
    lst = [pair2-pair1 for pair1, pair2 in pairwise(lst)]

print(*lst, sep=',')