题解 | #安置路灯#
安置路灯
http://www.nowcoder.com/practice/3a3577b9d3294fb7845b96a9cd2e099c
创建游标移动查找,方法估计很多,能ac就行
n = int(input().strip()) for _ in range(n): m = int(input().strip()) z = input().strip() left = 0 num = 0 while left < m : if left < m and z[left] == '.' : num += 1 left += 3 else : left += 1 print(num)