Written by
최태열
on
on
[python][정올][Intermediate_Coder] 1809 : 탑
[python][정올][Intermediate_Coder] 1809 : 탑
코드
N = int (input())
towers = list(map(int,input().split()))
check = [0]*len(towers)
for idx, tower in enumerate(towers):
for nx in range(idx+1, len(towers)):
if towers[nx]<tower:
check[nx]=idx+1
else:
break
print(*check)
Discussion and feedback