본문 바로가기
python-algorithm

[백준] 10102

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

1
2
3
4
5
6
7
8
9
10
11
import sys
n=int(sys.stdin.readline())
s=sys.stdin.readline()
cntA=0
cntB=0
for i in range(n):
    if s[i]=='A': cntA+=1
    elif s[i]=='B' : cntB+=1
if cntA>cntB: print("A")
elif cntA<cntB: print("B")
else : print("Tie")
cs
반응형

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

[백준] 10807  (0) 2021.01.11
[백준] 10275  (0) 2021.01.11
[백준] 10093  (0) 2021.01.11
[백준] 9546  (0) 2021.01.10
[백준] 9086  (0) 2021.01.10

댓글