[Python] 6064: 정수 3개 입력받아 가장 작은 값 출력하기

3항 연산자를 이용하여 쉽게 풀 수 있다.

1
2
3
4
5
6
7
import sys
 
a, b, c = map(int, sys.stdin.readline().rstrip().split())
 
print((a if a < b else b) if ((a if a < b else b) < c) else c)
 
 
cs

관련글

cURL error 28: Connection timed out after 5001 milliseconds