Skip to content

Files

Latest commit

Jul 30, 2015
31b1f06 · Jul 30, 2015

History

History

038.Count_and_Say

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
Jul 30, 2015
Mar 20, 2015
Jul 30, 2015

readme.md

038. Count and Say (Easy)

链接

题目:https://leetcode.com/problems/Count-and-Say/
代码(github):https://github.com/illuz/leetcode

题意

数数,第一个是 1,第二个是数前一个数:1 个 1,就是 11,第三个是 2 个 1,就是 21,第三个是 1 个 2,1 个 1,就是 1211,第四个是 111221... 现在问第 n 个数是什么。

分析

可以直接模拟,一个个数过去。