-
[python]백준 핸드폰 요금 1267번알고리즘 문제풀이/백준(파이썬) 2023. 5. 11. 23:38
코드
import sys sys.stdin = open("1267.txt", "r") n = int(input()) q = list(map(int, input().split())) a = 0 b = 0 for i in q: a += i // 30 * 10 + 10 b += i // 60 * 15 + 15 if a < b: print('Y %d' % a) elif a > b: print('M %d' % b) else: print('Y M %d' % a)
링크
https://www.acmicpc.net/problem/1267
'알고리즘 문제풀이 > 백준(파이썬)' 카테고리의 다른 글
[python]백준 0123456789 6916번 (1) 2023.05.13 [python]백준 공 1547번 (0) 2023.05.12 [python]백준 베라의 패션 15439번 (0) 2023.05.10 [python]백준 AFC 윔블던 4299번 (0) 2023.05.09 [python]백준 그릇 7567번 (0) 2023.05.08