반응형
문제 설명
https://www.acmicpc.net/problem/1267
제출한 코드
import sys
a = int(sys.stdin.readline())
num_list = list(map(int, sys.stdin.readline().split()))
Y = 0
M = 0
for i in range(a):
Y += num_list[i]//30 +1
M += num_list[i]//60+1
Y *= 10
M *= 15
if Y<M :
print("Y", Y)
elif M<Y :
print("M", M)
else :
print("Y M", Y)
결과
후기
반응형
'BQJ 백준 > python' 카테고리의 다른 글
[Python/파이썬] 백준 1316번: 그룹 단어 체커 (0) | 2024.06.11 |
---|---|
[Python/파이썬] 백준 1271번: 엄청난 부자2 (0) | 2024.06.11 |
[Python/파이썬] 백준 1264번: 모음의 개수 (0) | 2024.06.09 |
[Python/파이썬] 백준 1259번: 팰린드롬수 (0) | 2024.06.09 |
[Python/파이썬] 백준 1157번: 단어 공부 (0) | 2024.06.09 |