エンジニア死滅シタ世界之学べない学校 [MISSION LEVEL: C]-Python3

答案

# coding: utf-8
# 自分の得意な言語で
# Let's チャレンジ!!

N=input()
w_a=0
w_b=0
gpc_dict={
    "gg":0,"cc":0,"pp":0,"gc":1,
    "cp":1,"cg":-1,"pc":-1,
    "pg":1,"gp":-1,
}

for i in range(int(N)):
    ab=input()
    new_ab=ab.replace(" ","")
    who_win=gpc_dict.get(new_ab)
    if who_win>0:
        w_a+=1
    elif who_win<0:
        w_b+=1
print(w_a)
print(w_b)

猜你喜欢

转载自www.cnblogs.com/c-x-a/p/11664589.html
今日推荐