백준 8958 #8958 testcase = int(input()) for i in range(testcase): ox_list = list(input()) score = 0 sum_score = 0 sums = [] for ox in ox_list: if ox == "O": score+=1 sum_score += score else: score = 0 print(sum_score) Deep Learning/Algorithm 2022.03.31