BQJ 백준/python

[Python/파이썬] 백준 4589번: Gnome Sequencing

아류시 2024. 5. 26. 09:36
반응형

문제 설명

https://www.acmicpc.net/problem/4589

https://www.acmicpc.net/board/view/91873

 

 

제출한 코드

print("Gnomes:")
num = int(input())
for i in range(num) :
    lst = list(map(int, input().split()))
    if (lst[2] - lst[1] >= 0 and lst[1] - lst[0] >= 0) or (lst[2] - lst[1] < 0 and lst[1] - lst[0] < 0) :
        print("Ordered")
    else :
        print("Unordered")

 

 

 

 

결과

 

 

후기

 

 

 

 

반응형