1137. 第 N 个泰波那契数
题目链接:https://leetcode-cn.com/problems/n-th-tribonacci-number/
解题思路
预处理n = 1,2,3的情况
再迭代模拟运算
执行用时:0 ms, 在所有 Swift 提交中击败了100.00%的用户
内存消耗:13.3 MB, 在所有 Swift 提交中击败了70.83%的用户
代码
1 | |
1137. 第 N 个泰波那契数
https://pisces34.github.io/2021/08/08/leetcode/n-th-tribonacci/