結果

問題 No.64 XORフィボナッチ数列
ユーザー code-devocode-devo
提出日時 2016-01-06 19:54:44
言語 Ruby
(3.3.0)
結果
TLE  
実行時間 -
コード長 106 bytes
コンパイル時間 51 ms
コンパイル使用メモリ 11,840 KB
実行使用メモリ 354,572 KB
最終ジャッジ日時 2023-10-19 16:12:01
合計ジャッジ時間 7,864 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 88 ms
16,032 KB
testcase_01 AC 87 ms
16,032 KB
testcase_02 AC 88 ms
16,032 KB
testcase_03 AC 87 ms
16,032 KB
testcase_04 AC 86 ms
16,032 KB
testcase_05 AC 87 ms
16,032 KB
testcase_06 AC 86 ms
16,032 KB
testcase_07 AC 87 ms
16,032 KB
testcase_08 AC 87 ms
16,032 KB
testcase_09 TLE -
testcase_10 -- -
testcase_11 -- -
testcase_12 -- -
testcase_13 -- -
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

f0, f1, n = gets.split.map(&:to_i)

a = [f0, f1]
for i in 2..n do
  a[i] = a[i-2] ^ a[i-1]
end

puts a[n]
0