i=int(input())
arr=[]
for x in range(i):
arr.append(input())
#print(arr)#배열에 뭐가 들어있는지 보기위해서 문제 외에 작성함
tot = 0
point = 0
for x in arr:
for y in x:
if y == 'O':
point += 1
tot += point
elif y == 'X':
point = 0
print(tot)
point = 0
tot = 0
'알고리즘 > 백준' 카테고리의 다른 글
백준-9020번(골드바흐의 추측)-python3 (0) | 2023.11.29 |
---|---|
백준-9012번(괄호)-python3 (0) | 2023.11.29 |
백준-7785번(회사에 있는 사람)-python3 (0) | 2023.11.28 |
백준-7576번(토마토)-python3 (0) | 2023.11.27 |
백준-7567번(그릇)-python3 (0) | 2023.11.27 |