본문 바로가기
python-algorithm

[백준] 17201

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

1
2
3
4
5
6
n=int(input())
s=input()
cnt=0
for i in range(len(s)-1):
    if s[i]==s[i+1]:cnt=1;print("No");exit()
if cnt==0print("Yes")
cs
반응형

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

[백준] 17249  (0) 2021.01.18
[백준] 17206  (0) 2021.01.18
[백준] 17173  (0) 2021.01.18
[백준] 16968  (0) 2021.01.18
[백준] 16944  (0) 2021.01.18

댓글