[BOJ] [5557] 1학년 (Python)
내 해답) import sys; ip = sys.stdin.readline N = int(ip()) nl = list(map(int,ip().split())) #입력 받기 before = {0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:0,11:0,12:0,13:0,14:0,15:0,16:0,17:0,18:0,19:0,20:0} after = {0:0,1:0,2:0,3:0,4:0,5:0,6:0,7:0,8:0,9:0,10:0,11:0,12:0,13:0,14:0,15:0,16:0,17:0,18:0,19:0,20:0} before[nl[0]] = 1 #초기 세팅 for i in range(1,N-1): #N번 반복 q = [k for k,v in before.items() if ..
2023. 2. 20.