[백준] 1267번 : 핸드폰 요금 - Python(파이썬)

강재원·2022년 10월 5일
0

[코딩테스트] Python

목록 보기
97/200



https://www.acmicpc.net/problem/1267

n=int(input())
sy=0
sm=0
a=list(map(int,input().split()))
for i in range(n):
    sy+=(a[i]//30+1)*10
    sm+=(a[i]//60+1)*15
if sy>sm: print("M %d"%sm)
elif sy<sm: print("Y %d"%sy)
else: print("Y M %d"%sy)
profile
개념정리 & 문법 정리 & 알고리즘 공부

0개의 댓글