标签:
def IsContinuous(seq, num = 5): zeros = 0; d = 0 seq = sorted(seq) for i in range(num - 1): if seq[i] == 0: zeros += 1 continue if seq[i] == seq[i + 1]: return False d += seq[i + 1] - seq[i] - 1 return zeros >= d
标签:
原文地址:http://www.cnblogs.com/mengfanrong/p/5047262.html