索引:[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 个数是什么。

分析

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

代码

相关文章:

  • 2022-12-23
  • 2022-02-14
  • 2021-07-29
  • 2022-02-05
  • 2021-07-07
  • 2021-10-02
  • 2021-09-10
  • 2021-11-14
猜你喜欢
  • 2021-08-08
  • 2022-12-23
  • 2021-05-22
  • 2021-11-24
  • 2021-10-27
  • 2021-06-05
  • 2022-03-04
相关资源
相似解决方案