LeetCode-38-Count and Say Python的int_to_string
来源:互联网 发布:移动网络玩战舰世界 编辑:程序博客网 时间:2024/06/05 09:30
题意真的很难理解。。。
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
阅读全文
1 0
- LeetCode-38-Count and Say Python的int_to_string
- Leetcode-Count and Say-Python
- 【Leetcode】【python】Count and Say
- [LeetCode 38] Count and Say
- LeetCode(38) Count and Say
- [leetcode 38] Count and Say
- [Leetcode] 38 - Count and Say
- leetcode-38 count and say
- [LeetCode 38]Count and Say
- LeetCode 38 Count and Say
- leetcode-38 Count and Say
- Leetcode 38 Count and Say
- Leetcode---(38)Count and Say
- leetcode 38: Count and Say
- Leetcode# 38 Count and Say
- leetcode[38]:Count and Say
- leetcode-38 Count And Say
- [Leetcode]#38 Count and Say
- c#中怎么获得当前路径
- android 异常处理详解
- CardView详解
- RSync实现文件备份同步
- Icommand用法
- LeetCode-38-Count and Say Python的int_to_string
- C语言之printf() %s 转换说明修饰符
- React性能优化——工具篇
- Linux查找含有某字符串的所有文件
- Python-安装Numpy,Scipy,Matplotlib-pip+whl文件
- 阿里云服务器怎么用 , 阿里云服务器的使用方法。
- java 基础语法(序列化&文本数据读写)
- Intelij idea tomcat7
- Hololens开发-The associated script can not be loaded