본문 바로가기
Beakjoon&프로그래머스/파이썬

[백준/파이썬] 25641번 균형 잡힌 소떡소떡

by 현장 2022. 10. 22.

-Code

n = int(input())
s = list(input())
for i in range(n):
    if s.count('s') == s.count('t'):
        break
    s.pop(0)
print(*s, sep='')