linecode专题

Linecode 1870 · Number of Substrings with All Zeroes [Python]

每一段连续的0 有多少全0substring呢?观察计算可知是其长度N的连续加和至0,也就是N + N-1 + N-2 。。。。+ 1 class Solution:"""@param str: the string@return: the number of substrings """def stringCount(self, string):# Write your code here.p