알고리즘/코드업
[CodeUp]기초100제(python)_1064번 : [삼항연산] 정수 3개 입력받아 가장 작은 수 출력하기
Orange57
2020. 3. 29. 19:09
728x90
반응형
SMALL
문제 :
입력된 세 정수 a, b, c 중 가장 작은 값을 출력하는 프로그램을 작성해보자.
단, 조건문을 사용하지 않고 3항 연산자 ? 를 사용한다.
답 :
방법1
방법2
설명 :
map 함수 정리 부분 참고
=> https://deepflowest.tistory.com/70
[파이썬] map 함수
map 함수 : 리스트의 요소를 지정된 함수로 처리해주는 함수 list(map(함수, 리스트)) tuple(map(함수, 튜플)) >>> a = [1.3, 2.4, 5.7] >>> a = list(map(int, a)) >>> a [1, 2, 5] ▶input().split()에 map 쓰기..
deepflowest.tistory.com
코드 : https://github.com/Yearang-Lee/Algorithm/tree/master/CodeUp
Yearang-Lee/Algorithm
Contribute to Yearang-Lee/Algorithm development by creating an account on GitHub.
github.com
728x90
반응형
LIST