본문 바로가기
코딩테스트 파이썬/Softeer

Softeer 연습문제(2단계) - 8단 변속기

by 세용용용용 2024. 6. 26.

Candidate | Softeer Assessment UI

 

Candidate | Softeer Assessment UI

 

softeer.ai

 

나의 코드

import sys
input = sys.stdin.readline

value = list(map(int,input().split()))

result = []
for i in range(7):
    if value[i+1]-value[i] not in result:
        result.append(value[i+1]-value[i])
if len(result)!=1:
    print('mixed')
else:
    if result[0]==1:
        print('ascending')
    else:
        print('descending')