結果

問題 No.64 XORフィボナッチ数列
ユーザー gemmarogemmaro
提出日時 2020-01-26 08:47:32
言語 C++17
(gcc 12.3.0 + boost 1.83.0)
結果
MLE  
実行時間 -
コード長 299 bytes
コンパイル時間 1,191 ms
コンパイル使用メモリ 74,912 KB
実行使用メモリ 814,132 KB
最終ジャッジ日時 2023-10-12 11:54:01
合計ジャッジ時間 3,727 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
4,352 KB
testcase_01 AC 1 ms
4,352 KB
testcase_02 AC 1 ms
4,352 KB
testcase_03 AC 2 ms
4,348 KB
testcase_04 AC 2 ms
4,348 KB
testcase_05 AC 1 ms
4,352 KB
testcase_06 AC 1 ms
4,348 KB
testcase_07 AC 1 ms
4,348 KB
testcase_08 AC 2 ms
4,352 KB
testcase_09 MLE -
testcase_10 -- -
testcase_11 -- -
testcase_12 -- -
testcase_13 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <vector>

int32_t main() {
    uint64_t f0, f1, n;
    std::cin >> f0 >> f1 >> n;

    std::vector<uint64_t> fibs{f0, f1};
    for (uint64_t i = 2; i <= n; ++i) {
        fibs.push_back(fibs.at(i - 1) ^ fibs.at(i - 2));
    }

    std::cout << fibs.at(n) << std::endl;
}
0