2019年10月14日22:15:15
num_cases = int(input()) ans = [0]*num_cases for i in range(num_cases): num_bulbs = int(input()) bulbs_str = input() j=0 while j < num_bulbs: if bulbs_str[j] =='.': j+=3 ans[i]+=1 else: j+=1 for i in ans: print(i)
num_cases = int(input()) ans = [0]*num_cases for i in range(num_cases): num_bulbs = int(input()) bulbs_str = input() j=0 while j < num_bulbs: if bulbs_str[j] =='.': j+=3 ans[i]+=1 else: j+=1 for i in ans: print(i)
相关推荐