난이도: 레벨2
https://school.programmers.co.kr/learn/courses/30/lessons/12939
프로그래머스
코드 중심의 개발자 채용. 스택 기반의 포지션 매칭. 프로그래머스의 개발자 맞춤형 프로필을 등록하고, 나와 기술 궁합이 잘 맞는 기업들을 매칭 받으세요.
programmers.co.kr
형변환과 max,min 함수만 이용하면 쉽게 풀 수 있다.
def solution(s):
s = list(map(int,list(s.split())))
print(s)
a = []
a.append(min(s))
a.append(max(s))
print(*a)
ans = str(a[0])+" "+str(a[1])
return ans
'Problem Solving > 구현' 카테고리의 다른 글
짝수와 홀수 (0) | 2023.09.17 |
---|---|
자릿수 더하기 (0) | 2023.09.17 |
평균 구하기 (0) | 2023.09.16 |
약수의 합 (0) | 2023.09.16 |
프로그래머스 Array (0) | 2023.04.28 |