您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

11 行
250B

  1. states = [[0, 0, 0, 0, 0, 0, 0, 0, 0]]
  2. for n in text.split(','):
  3. states[0][int(n)] += 1
  4. for day in range(256):
  5. states.append(states[-1][1:] + states[-1][:1])
  6. states[-1][6] += states[-2][0]
  7. ans1 = sum(states[80])
  8. ans2 = sum(states[256])