본문 바로가기
python-algorithm

[백준] 11531

by 무적김두칠 2021. 1. 13.

1
2
3
4
5
6
7
8
9
10
acm=[]
cnt=0
anscnt=0
while 1:
    try:
        a,b,c=input().split()
        if c=='right': cnt+=acm.count(b)*20+int (a) ; anscnt+=1
        acm.append(b)
    except : break
print(anscnt, cnt)
cs
반응형

'python-algorithm' 카테고리의 다른 글

[백준] 11720  (0) 2021.01.13
[백준] 11648  (0) 2021.01.13
[백준] 11365  (0) 2021.01.13
[백준] 11296  (0) 2021.01.13
[백준] 11094  (0) 2021.01.13

댓글