結果
問題 | No.64 XORフィボナッチ数列 |
ユーザー | fine |
提出日時 | 2015-10-15 23:09:02 |
言語 | Ruby (3.3.0) |
結果 |
TLE
|
実行時間 | - |
コード長 | 233 bytes |
コンパイル時間 | 344 ms |
コンパイル使用メモリ | 11,372 KB |
実行使用メモリ | 19,856 KB |
最終ジャッジ日時 | 2023-09-28 21:54:29 |
合計ジャッジ時間 | 8,079 ms |
ジャッジサーバーID (参考情報) |
judge13 / judge12 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 79 ms
15,160 KB |
testcase_01 | AC | 82 ms
15,188 KB |
testcase_02 | AC | 80 ms
15,236 KB |
testcase_03 | AC | 78 ms
15,228 KB |
testcase_04 | AC | 80 ms
15,116 KB |
testcase_05 | AC | 81 ms
15,160 KB |
testcase_06 | AC | 82 ms
15,044 KB |
testcase_07 | AC | 81 ms
15,120 KB |
testcase_08 | AC | 80 ms
15,292 KB |
testcase_09 | TLE | - |
testcase_10 | -- | - |
testcase_11 | -- | - |
testcase_12 | -- | - |
testcase_13 | -- | - |
コンパイルメッセージ
Syntax OK
ソースコード
def fibo(f_0,f_1,n) case n when 0 return f_0 when 1 return f_1 else f = 0 (n - 1).times{ f = f_0 ^ f_1 f_0 = f_1 f_1 = f } return f end end f_0,f_1,n = gets.chomp.split(" ").map(&:to_i) puts fibo(f_0,f_1,n)