Movatterモバイル変換


[0]ホーム

URL:


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

Commit2220d07

Browse files
refactor 1137
1 parent87f90d8 commit2220d07

File tree

1 file changed

+0
-25
lines changed

1 file changed

+0
-25
lines changed

‎src/main/java/com/fishercoder/solutions/_1137.java

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -2,31 +2,6 @@
22

33
importjava.util.stream.IntStream;
44

5-
/**
6-
* 1137. N-th Tribonacci Number
7-
*
8-
* The Tribonacci sequence Tn is defined as follows:
9-
*
10-
* T0 = 0, T1 = 1, T2 = 1, and Tn+3 = Tn + Tn+1 + Tn+2 for n >= 0.
11-
*
12-
* Given n, return the value of Tn.
13-
*
14-
* Example 1:
15-
* Input: n = 4
16-
* Output: 4
17-
*
18-
* Explanation:
19-
* T_3 = 0 + 1 + 1 = 2
20-
* T_4 = 1 + 1 + 2 = 4
21-
*
22-
* Example 2:
23-
* Input: n = 25
24-
* Output: 1389537
25-
*
26-
* Constraints:
27-
* 0 <= n <= 37
28-
* The answer is guaranteed to fit within a 32-bit integer, ie. answer <= 2^31 - 1.
29-
* */
305
publicclass_1137 {
316
publicstaticclassSolution1 {
327
publicinttribonacci(intn) {

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp