728x90
#어떤 숫자들이 입력되었을 때 그게 오름차순인지 파악
def is_ascending(numbers):
for i in range(1, len(numbers)):
if (numbers[i] < numbers[i-1]):
return False
return True
k = input()
s = k.split()
a = []
for nums in s:
a.append(int(nums))
print(is_ascending(a))
728x90
'호그와트' 카테고리의 다른 글
아주 간단하면서 깔끔한 논리 (0) | 2022.12.24 |
---|---|
아주 간단한 해킹 리뷰 Tryhackme Bounty Hacker (1) | 2022.12.23 |
지구를 지켜라 (0) | 2022.12.21 |
빨간약 먹을래? 파란약 먹을래? (0) | 2022.12.20 |
컴퓨터와 디악초프라 (1) | 2022.12.16 |