SWEA 1208. [S/W 문제해결 기본] 1일차 Flatten 파이썬
·
CodingTest
# blocks = [5,8,3,1,5,6,9,9,2,2,4] def dump() : blocks[-1] = blocks[-1] -1 blocks[0] = blocks[0] + 1 if blocks[0] > blocks[1] or blocks[-1] < blocks[-2] : blocks.sort() def find_min_max () : return blocks[-1] -blocks[0]