https://www.acmicpc.net/problem/27294
27294번: 몇개고?
첫 번째 줄에 시간을 의미하는 정수 $T$ ($0 \le T \le 23$)와 술의 유무를 의미하는 정수 $S$ ($0 \le S \le 1$)가 공백으로 구분되어 주어진다. $T$가 $11$이하이면 아침 시간, $12$이상 $16$ 이하이면 점심 시
www.acmicpc.net
1
2
3
4
5
6
7
8
9
10
11
|
def sol(t, s):
if t>=12 and t<=16 and s == 0:
return 320
else:
return 280
if __name__ == '__main__':
t, s = map(int, input().split())
print(sol(t, s))
|
cs |
반응형
'python-algorithm' 카테고리의 다른 글
leetcode 1967. Number of Strings That Appear as Substrings in Word (2) | 2023.02.03 |
---|---|
백준 27332 11 月 (November) (0) | 2023.02.01 |
백준 27328 三方比較 (Three-Way Comparison) (0) | 2023.01.31 |
백준 27327 時間 (Hour) (0) | 2023.01.31 |
백준 27331 2 桁の整数 (Two-digit Integer) (0) | 2023.01.31 |
댓글