Skip to content

Commit

Permalink
2024-03-29 OX퀴즈
Browse files Browse the repository at this point in the history
  • Loading branch information
pu2rile committed Mar 29, 2024
1 parent 8e36f0e commit af9aec0
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions pu2rile/구현/OX퀴즈.py
Original file line number Diff line number Diff line change
@@ -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)

0 comments on commit af9aec0

Please sign in to comment.