码迷,mamicode.com
首页 >  
搜索关键字:count-say    ( 197个结果
LeetCode --- 38. Count and Say
题目链接:Count and Say 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 read off as "two 1s" or 21. 2...
分类:其他好文   时间:2015-02-06 00:51:16    阅读次数:133
Count and Say
一、 题目 题目说,如下的字符串: 1, 11, 21, 1211, 111221, ... 1读成11(一个1) 11读成21(两个1) 21读成(一个2一个1) ...... 给一个整数,返回对应得语句。返回语句为一个字符串 二、 分析 题目的意思不是很明白,其实就是说第i+1个字符串是第i个字符串的读法,第一字符串为 “1” 比如第四个字符串是1211,它的读法是 1个1...
分类:其他好文   时间:2015-02-05 20:29:03    阅读次数:152
Leetcode#38 Count and Say
原题地址简单模拟题从1开始推即可。不知道有没有规律可以直接求出n代码: 1 string countAndSay(int n) { 2 if (n <= 0) 3 return ""; 4 5 string str =...
分类:其他好文   时间:2015-02-02 09:27:19    阅读次数:136
Count and Say
The count-and-say sequence is the sequence of integers beginning as follows:1, 11, 21, 1211, 111221, ...1is read off as"one 1"or11.11is read off as"tw...
分类:其他好文   时间:2015-01-30 06:37:50    阅读次数:188
[Leetcode] 38 - Count and Say
原题链接:https://oj.leetcode.com/problems/count-and-say/ 这道题其实考的还是细心了,外层循环n,内存循环当前字符长度。 class Solution { public: string countAndSay(int n) { string res = ""; if (n < 0) retur...
分类:其他好文   时间:2015-01-29 17:36:51    阅读次数:105
Count and Say
Count and SayThe count-and-say sequence is the sequence of integers beginning as follows:1, 11, 21, 1211, 111221, ...1is read off as"one 1"or11.11is r...
分类:其他好文   时间:2015-01-27 23:13:12    阅读次数:244
leetcode------Count and Say
标题:Count and Say通过率:25.8%难度:简单The count-and-say sequence is the sequence of integers beginning as follows:1, 11, 21, 1211, 111221, ...1is read off as"...
分类:其他好文   时间:2015-01-27 17:55:57    阅读次数:172
[LeetCode]38.Count and Say
【题目】 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 read off as "two 1s" or 21. 21 is re...
分类:其他好文   时间:2015-01-27 13:25:04    阅读次数:167
[leetcode]Count and Say
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 r...
分类:其他好文   时间:2015-01-24 06:42:45    阅读次数:169
Count and Say -- leetcode
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 read off as "two 1s" or 21. 21 is read off as ...
分类:其他好文   时间:2015-01-15 14:24:40    阅读次数:158
197条   上一页 1 ... 13 14 15 16 17 ... 20 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!