Skip to content

Commit

Permalink
Merge pull request #6 from AlgoLeadMe/2-pu2rile
Browse files Browse the repository at this point in the history
2-pu2rile
  • Loading branch information
pu2rile authored Apr 5, 2024
2 parents e7f6176 + af9aec0 commit 8562aa5
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 8562aa5

Please sign in to comment.