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

[백준/파이썬] 33772번 Wow

by 현장 2025. 4. 27.

-Code

n = int(input())
total = [input() for _ in range(2)]
dot_cnt, flag, res = 0, False, ""

for el in total[1][3:]:
    if el == '.':
        dot_cnt += 1
    elif el == '\\':
        if dot_cnt == 2:
            flag = True
        elif dot_cnt == 3:
            res += "w" if flag else "v"
            flag = False
        dot_cnt = 0
res += "w" if flag else "v"
print(res)