Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 10be5f0

Browse files
Add README.md for 0038.Count and Say
1 parent 24a9c8a commit 10be5f0

File tree

1 file changed

+33
-0
lines changed

1 file changed

+33
-0
lines changed
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
## 报数
2+
### 题目描述
3+
4+
报数序列是一个整数序列,按照其中的整数的顺序进行报数,得到下一个数。其前五项如下:
5+
```
6+
1. 1
7+
2. 11
8+
3. 21
9+
4. 1211
10+
5. 111221
11+
```
12+
13+
`1` 被读作 `"one 1"` (`"一个一"`) , 即 `11`
14+
`11` 被读作 `"two 1s"` (`"两个一"`), 即 `21`
15+
`21` 被读作 `"one 2"`, `"one 1"` (`"一个二"` , `"一个一"`) , 即 `1211`
16+
17+
给定一个正整数 n(1 ≤ n ≤ 30),输出报数序列的第 n 项。
18+
19+
注意:整数顺序将表示为一个字符串。
20+
21+
22+
23+
示例 1:
24+
```
25+
输入: 1
26+
输出: "1"
27+
```
28+
29+
示例 2:
30+
```
31+
输入: 4
32+
输出: "1211"
33+
```

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /