
[Python] 백준 #20365- 블로그 2
·
코딩테스트/백준[Python]
문제 20365번: 블로그2 neighbor 블로그를 운영하는 일우는 매일 아침 풀고 싶은 문제를 미리 정해놓고 글을 올린다. 그리고 매일 밤 각각의 문제에 대하여, 해결한 경우 파란색, 해결하지 못한 경우 빨간색으로 칠한 www.acmicpc.net 코드 My answer import sys input=sys.stdin.readline n=int(input()) a=input() cnt=0 temp=[a[0]] for i in range(1,len(a)): if(a[i]!=temp[-1] and a[i]!='\n'): temp.append(a[i]) temp='.'.join(temp) b=temp.count('B') r=temp.count('R') c=temp.count('.')+1 answer=min..