diff --git "a/pu2rile/\352\265\254\355\230\204/OX\355\200\264\354\246\210.py" "b/pu2rile/\352\265\254\355\230\204/OX\355\200\264\354\246\210.py" new file mode 100644 index 0000000..d72cf8c --- /dev/null +++ "b/pu2rile/\352\265\254\355\230\204/OX\355\200\264\354\246\210.py" @@ -0,0 +1,12 @@ +n = int(input()) +for _ in range(n): + test = list(input()) + score = 0 + sum_score = 0 #새로운 태스트를 입력받으면 점수 리셋 + for ox in test: + if ox == 'O': + score += 1 #'O'가 연속되면 점수가 1점씩 추가 + sum_score += score + else: + score = 0 + print(sum_score) \ No newline at end of file