[LeetCode] 038. Count and Say (Easy) (C++/Python)

索引:[LeetCode] Leetcode 题解索引 (C++/Java/Python/Sql)
Github: https://github.com/illuz/leetcode


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 个数是什么。

分析

能够直接模拟,一个个数过去。

代码

原文地址:https://www.cnblogs.com/yangykaifa/p/7193777.html