結果

問題 No.64 XORフィボナッチ数列
ユーザー f843nmfwisfeuwf843nmfwisfeuw
提出日時 2020-09-01 21:18:20
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
AC  
実行時間 2 ms / 5,000 ms
コード長 619 bytes
コンパイル時間 743 ms
コンパイル使用メモリ 91,628 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-04-30 19:41:34
合計ジャッジ時間 1,370 ms
ジャッジサーバーID
(参考情報)
judge4 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

#include <iostream>
#include <vector>
#include <algorithm>
#include <cmath>
#include <iomanip>
#include <stack>
#include <algorithm>
#include <string>
#include <map>
#include <iterator>
#include <set>
#include <queue>
#include <bitset>
#include <cassert>

using namespace std;

int main() {

    unsigned long long F0, F1, N;
    cin >> F0 >> F1 >> N;
    unsigned long long F2 = F0 ^F1;
    switch (N % 3) {
        case 0:
            cout << F0 << endl;
            break;
        case 1:
            cout << F1 << endl;
            break;
        case 2:
            cout << F2 << endl;
            break;
    }


}
0