문제를 엄청 쉽게 생각하고 막풀다가
조금 헤멧는데..
S만 입력됐을때를 처리를 안해서... 오래 걸렸다.. 한 10분 헤멘듯;;
N = int(input())
S = input()
counter = 0
if S.count("S") == N:
print(S.count("S"))
else:
counter += S.count("LL")
counter += S.count("S")
print(counter + 1)
댓글