Deep Learning/Algorithm

백준 8958

frances._.sb 2022. 3. 31. 16:21
728x90

#8958
testcase = int(input())

for i in range(testcase):
  ox_list = list(input())
  score = 0
  sum_score = 0
  sums = []
  for ox in ox_list:
    if ox == "O":
      score+=1
      sum_score += score
    else:
      score = 0
  print(sum_score)
728x90
반응형

'Deep Learning > Algorithm' 카테고리의 다른 글

백준 15596  (0) 2022.04.01
백준 4344  (0) 2022.04.01
백준 3052, 1546  (0) 2022.03.31
백준 10757, 10871  (0) 2022.03.31
백준 2839  (0) 2022.03.29