From af9aec0116356dd6c128a013f6ada8be546d24b2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B9=80=EB=8F=84=ED=98=84=20KimDohyun?= <202230418@pukyong.ac.kr> Date: Fri, 29 Mar 2024 17:36:41 +0900 Subject: [PATCH] =?UTF-8?q?2024-03-29=20OX=ED=80=B4=EC=A6=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../OX\355\200\264\354\246\210.py" | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 "pu2rile/\352\265\254\355\230\204/OX\355\200\264\354\246\210.py" 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