题意真的很难理解。。。
class Solution(object):
def countAndSay(self, n):
"""
:type n: int
:rtype: str
"""
if n==1:return "1"
s="1"
for i in range(n-1):
p=0;
nexts=""
while(p<len(s)):
startp=p
while(p<len(s) and s[p]==s[startp]):
p+=1
nexts+=str(p-startp)+s[startp]
s=nexts
#print s
return s