https://www.acmicpc.net/problem/26264
26264번: 빅데이터? 정보보호!
첫 번째 줄에 정보보호 분야보다 빅데이터 분야에 관심이 있는 학생이 더 많으면 "bigdata?"를, 빅데이터 분야보다 정보보호 분야에 관심이 있는 학생이 더 많으면 "security!"를, 같으면 "bigdata? securit
www.acmicpc.net
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
def sol(s):
cnt_security = s.count('security')
cnt_bigdata= s.count('bigdata')
if cnt_security>cnt_bigdata:
return 'security!'
elif cnt_security<cnt_bigdata:
return 'bigdata?'
else:
return 'bigdata? security!'
if __name__ == '__main__':
n = int(input())
s = input()
print(sol(s))
|
cs |
반응형
'python-algorithm' 카테고리의 다른 글
백준 11328 Strfry (0) | 2023.01.02 |
---|---|
백준 3512 Flat (0) | 2022.12.31 |
백준 26004 HI-ARC (0) | 2022.12.28 |
백준 10698 Ahmed Aly (0) | 2022.12.28 |
백준 16428 A/B - 3 (0) | 2022.12.28 |
댓글