# ============================== # [연습문제 4] 가장 먼 카드 # N개의 카드가 있을 때, # 두 카드의 값 차이 중 최댓값을 구하시오. # 입력 예시 # 6 # 10 3 25 7 15 1 # 출력 예시 # 24 # n = int(input()) # nl= list(map(int,input().split())) # #최대 # max = 0 # for i in range(n): # if max < nl[i]: # max =nl[i] # min = 99999 # for i in range(n): # if min > nl[i]: # min =nl[i] print(max - min)
To embed this project on your website, copy the following code and paste it into your website's HTML: