[抄题]: The count-and-say sequence is the sequence of integers beginning as follows:1, 11, 21, 1211, 111221, ... 1 is read off as "one 1" or 11.11 is re ...
分类:
其他好文 时间:
2018-06-06 01:09:17
阅读次数:
170
原题题目如下截图: 自己在看这道题的时候一开始有点偏差。 题目上写着: 1 is read off as "one 1" or 11. 11 is read off as "two 1s" or 21. 21 is read off as "one 2, then one 1" or 1211. 那 ...
分类:
其他好文 时间:
2018-04-03 12:54:49
阅读次数:
153
原题链接: "https://leetcode.com/problems/count and say/description/" 奶奶的,这道题本身题意都不好读懂,然后即使明白了也还是没有写出解答来,所以最后还是无耻的抄袭了讨论区的答案! 首先要读懂题意: "https://www.2cto.com ...
分类:
其他好文 时间:
2018-03-15 13:21:14
阅读次数:
175
1:题目描述 Given an integer n, generate the nth term of the count-and-say sequence. 找规律,给定一个数n后,写出第n行的字符串 2:题目分析 突然发现自己的Say实在不发达,看了半个多小时才知道咋回事。n就是再说n-1行的内 ...
分类:
其他好文 时间:
2018-02-02 23:21:23
阅读次数:
179
一、问题描述 这个题面是很难理解,简单总结一下: 从1开始,序列是1。到2的时候,读1的序列,发现只有1个1,2的序列为11。到3的时候,去读2的序列,发现2个1,即3的序列为21。到4的时候,读3的序列,发现3的序列为1个2加1个1,所以4的序列为1211。到5的时候,读4的序列,发现4为1个1, ...
分类:
其他好文 时间:
2018-01-28 12:48:40
阅读次数:
126
class Solution(object): def countAndSay(self, n): """ :type n: int :rtype: str """ s=[] for i in range(n): if i==0: s.a... ...
分类:
其他好文 时间:
2017-12-18 12:36:06
阅读次数:
126
The count-and-say sequence is the sequence of integers with the first five terms as following: 1 is read off as "one 1" or 11.11 is read off as "two 1 ...
分类:
其他好文 时间:
2017-11-07 12:11:24
阅读次数:
138
The count-and-say sequence is the sequence of integers with the first five terms as following: 1. 1 2. 11 3. 21 4. 1211 5. 111221 1 is read off as "on ...
分类:
其他好文 时间:
2017-10-22 00:10:29
阅读次数:
137
The count-and-say sequence is the sequence of integers with the first five terms as following: 1 is read off as "one 1" or 11.11 is read off as "two 1 ...
分类:
其他好文 时间:
2017-10-07 14:48:21
阅读次数:
114
1 题干 相信大家第一次在leetcode上看到这道题的时候会觉得不知道表达的什么意思,而且还是英文版的,我也是那样,自己在网上搜索查看,找到很多别人写的文章,理解了其中的意思,在这里为自己也做一个简单的描述,首先请看下面的题目内容: The count-and-say sequence is th ...
分类:
其他好文 时间:
2017-09-29 16:34:44
阅读次数:
123