반응형
https://www.acmicpc.net/problem/8958
# @Author YoungMinKim
# baekjoon
n = int(input())
for i in range(n):
Num = input()
score = 0
cnt = 0
for j in range(len(Num)):
if Num[j] == 'O':
cnt += 1
score += cnt
elif Num[j] == 'X':
score += 0
cnt = 0
print(score)
반응형
'백준 문제풀이' 카테고리의 다른 글
baekjoon - python - 9498 (0) | 2020.08.27 |
---|---|
baekjoon - python - 9316 (0) | 2020.08.27 |
baekjoon - python - 8393 (0) | 2020.08.27 |
baekjoon - python - 5988 (0) | 2020.08.27 |
baekjoon - python - 5543 (0) | 2020.08.27 |
댓글