Description
The count-and-say sequence is the sequence of integers with the first five terms as following:
1 |
1. 1 |
Given an integer n where 1 ≤ n ≤ 30, generate the nth term of the count-and-say sequence.
Note: Each term of the sequence of integers will be represented as a string.
My Solution
Python
1 |
def (self, n): |
- 想法:遍历
近期评论