반응형
1330
a, b = map(int, input().split())
if a > b:
print('>')
elif a < b:
print('<')
else:
print('==')
9498
def judge_score(score):
if score >= 90:
return 'A'
elif score >= 80:
return 'B'
elif score >= 70:
return 'C'
elif score >= 60:
return 'D'
else:
return 'F'
score = int(input())
print(judge_score(score))
2753
def leap_year(year):
if (year % 4 == 0 and year % 100 != 0) or year % 400 == 0:
return 1
else:
return 0
year = int(input())
print(leap_year(year))
14681
def quadrant(x, y):
if x > 0 and y > 0:
return 1
elif x < 0 and y > 0:
return 2
elif x < 0 and y < 0:
return 3
else:
return 4
x = int(input())
y = int(input())
print(quadrant(x, y))
2884
H, M = map(int, input().split())
if H <= 0:
if M >= 45:
M -= 45
elif M < 45:
H = 23
M += 15
else:
if M >= 45:
M -= 45
elif M < 45:
H -= 1
M += 15
print(H, M)
2525 (시간 분이 60넘어갈 때와, 시가 24 넘어갈 때 생각)
H, M = map(int, input().split())
needs_time = int(input())
H += needs_time // 60
M += needs_time % 60
if M >= 60:
M -= 60
H += 1
if H >= 24:
H -= 24
print(H, M)
2480
def dice(a, b, c):
if a == b and b == c:
return 10000 + a*1000
elif (a == b and b != c) or (a == c and a != b):
return 1000 + a*100
elif b == c and a != c:
return 1000 + b*100
else:
return max(a, b, c) * 100
a, b, c = map(int, input().split())
print(dice(a, b, c))
'Baekjoon' 카테고리의 다른 글
[Baekjoon] 1476 날짜 계산 (실버 V) - Python (0) | 2023.11.24 |
---|---|
[Baekjoon] 9012 - 괄호 with Python (0) | 2023.07.20 |
[Baekjoon] 1914번 하노이탑(Silver I) with Python (0) | 2023.05.24 |
[Baekjoon] 9663번 N-Queen(Gold-IV) (0) | 2023.05.23 |
[Baekjoon] 단계별로 풀어보기 1. 입출력과 사칙연산 with Python (0) | 2023.04.28 |