๋ณธ๋ฌธ ๋ฐ”๋กœ๊ฐ€๊ธฐ
Algorithm/๋ฐฑ์ค€(BOJ)

[ ํŒŒ์ด์ฌ(python) ] ๋ฐฑ์ค€ 20053 - ์ตœ์†Œ, ์ตœ๋Œ€ 2

by YWTechIT 2021. 4. 26.
728x90

๐Ÿ“ ๋ฐฑ์ค€ 20053 - ์ตœ์†Œ, ์ตœ๋Œ€ 2

๋ฐฑ์ค€ 20053 - ์ตœ์†Œ, ์ตœ๋Œ€2


โšก๏ธ ๋‚˜์˜ ํ’€์ด

์ฃผ์–ด์ง„ ํ…Œ์ŠคํŠธ ์ผ€์ด์Šค๋งŒํผ while๋ฌธ์„ ์‚ฌ์šฉํ•˜์—ฌ ๊ฐ ์ผ€์ด์Šค๋งˆ๋‹ค ์ž…๋ ฅ์„ ๋ฐ›์•„ ์ตœ์†Œ, ์ตœ๋Œ€ ๊ฐ’์„ ์ถœ๋ ฅํ•˜๊ฒŒ ๋งŒ๋“ค์—ˆ๋‹ค.

 

import sys
input = sys.stdin.readline
T = int(input())

while T:
    N = int(input())
    arr = list(map(int, input().split()))
    print(min(arr), max(arr))
    T -= 1
๋ฐ˜์‘ํ˜•

๋Œ“๊ธ€