fork download
  1. ant=['1']
  2. round = 30
  3.  
  4. while round:
  5. ant += '!'
  6. next = []
  7. start = 0
  8.  
  9. for current in range(len(ant)):
  10. if ant[current] != ant[start]:
  11. next.append(str(current-start)+ant[start])
  12. start = current
  13. ant = "".join(next)
  14.  
  15. round-=1
  16.  
  17. print len(ant)
Success #stdin #stdout 0.04s 4648KB
stdin
Standard input is empty
stdout
5808