[백준]B3-2511

py_code·2021년 1월 8일
0

백준-브론즈3

목록 보기
32/38

A = tuple(map(int, input().split()))
B = tuple(map(int, input().split()))
state=''
for i in range(10):
    a,b = A[i],B[i]
    if a>b:
        state += 'A'
    elif a<b:
        state += 'B'
    else:
        state += 'D'

equal = state.count('D')
total_A = state.count('A')*3 + equal
total_B = state.count('B')*3 + equal
print(total_A, total_B)

if total_A == total_B:
    final_state = state.replace('D','')
    if len(final_state) != 0:
        print(state.replace('D','')[-1])
    else:
        print('D')
elif total_A > total_B : print('A')
else : print('B')
profile
개발자를 꿈꿉니다.

0개의 댓글