본문 바로가기
python-algorithm

Codeforces 734A - Anton and Danik

by 무적김두칠 2022. 4. 29.

1
2
3
4
5
6
7
n=int(input())
s=input()
cnt_anton=s.count('A')
cnt_danik=s.count('D')
if cnt_anton > cnt_danik :print('Anton')
elif cnt_anton < cnt_danik :print('Danik')
elif cnt_anton == cnt_danik :print('Friendship')
cs
반응형

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

codeforces 1328A - Divisibility Problem  (0) 2022.04.29
codeforces 339A - Helpful Maths  (0) 2022.04.29
codeforces 41A - Translation  (0) 2022.04.28
codeforces 59A - Word  (0) 2022.04.28
codeforces 236A. Boy or Girl  (0) 2022.04.28

댓글