1seul357

[SWEA] 회전 본문

알고리즘/SWEA

[SWEA] 회전

1seul 2021. 12. 2. 19:59
T = int(input())
for TC in range(T):
    N, M = map(int, input().split())
    data = list(map(int, input().split()))
    count = 0
 
    while count < M:
        data.append(data.pop(0))
        count += 1
 
    print('#{} {}'.format(TC+1, data[0]))

'알고리즘 > SWEA' 카테고리의 다른 글

[SWEA] 길 찾기  (0) 2021.12.02
[SWEA] 배열 최소 합  (0) 2021.12.02
[SWEA] 암호생성기  (0) 2021.12.02
[SWEA] 마그네틱  (0) 2021.12.02
[SWEA] 퍼펙트 셔플  (0) 2021.12.02