본문 바로가기
코딩테스트/softeer

[python] Level2_8단 변속기

by brown_board 2023. 1. 1.
728x90

https://softeer.ai/practice/info.do?idx=1&eid=408 

 

Softeer

연습문제를 담을 Set을 선택해주세요. 취소 확인

softeer.ai

 

1
2
3
4
5
6
7
8
9
10
11
import sys
 
# 입력변수를 받기
array = list(map(int,sys.stdin.readline().split()))
 
if array == [1,2,3,4,5,6,7,8]:
    print("ascending")
elif array == [8,7,6,5,4,3,2,1]:
    print("descending")
else:
    print("mixed")
cs
728x90

'코딩테스트 > softeer' 카테고리의 다른 글

[python] Level2_비밀 메뉴  (0) 2023.01.03
[python] Level2_지도 자동 구축  (0) 2023.01.01
[python] Level2_장애물 인식 프로그램  (0) 2023.01.01
[python] Level1_A+B  (0) 2023.01.01
[python] Level1_최단거리  (0) 2022.12.31

댓글