回答編集履歴
1
for を while に変更
test
CHANGED
@@ -16,7 +16,7 @@
|
|
16
16
|
|
17
17
|
else if (n == 2) r = n2;
|
18
18
|
|
19
|
-
else
|
19
|
+
else while (--n > 1) r = n1 + n2, n1 = n2, n2 = r;
|
20
20
|
|
21
21
|
return *result = r;
|
22
22
|
|