auto commit
This commit is contained in:
parent
092fef5d60
commit
63b4122c46
@ -154,7 +154,7 @@ public int JumpFloor(int n) {
|
|||||||
if (n <= 2)
|
if (n <= 2)
|
||||||
return n;
|
return n;
|
||||||
int pre2 = 1, pre1 = 2;
|
int pre2 = 1, pre1 = 2;
|
||||||
int result = 1;
|
int result = 0;
|
||||||
for (int i = 2; i < n; i++) {
|
for (int i = 2; i < n; i++) {
|
||||||
result = pre2 + pre1;
|
result = pre2 + pre1;
|
||||||
pre2 = pre1;
|
pre2 = pre1;
|
||||||
|
@ -154,7 +154,7 @@ public int JumpFloor(int n) {
|
|||||||
if (n <= 2)
|
if (n <= 2)
|
||||||
return n;
|
return n;
|
||||||
int pre2 = 1, pre1 = 2;
|
int pre2 = 1, pre1 = 2;
|
||||||
int result = 1;
|
int result = 0;
|
||||||
for (int i = 2; i < n; i++) {
|
for (int i = 2; i < n; i++) {
|
||||||
result = pre2 + pre1;
|
result = pre2 + pre1;
|
||||||
pre2 = pre1;
|
pre2 = pre1;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user