結果

問題 No.64 XORフィボナッチ数列
ユーザー kuisiba
提出日時 2016-03-29 10:38:45
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
AC  
実行時間 2 ms / 5,000 ms
コード長 309 bytes
コンパイル時間 491 ms
コンパイル使用メモリ 54,888 KB
実行使用メモリ 6,820 KB
最終ジャッジ日時 2024-10-02 07:19:26
合計ジャッジ時間 1,093 ms
ジャッジサーバーID
(参考情報)
judge4 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 11
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <cstdint>

using namespace std;

int main() {
    int64_t a, b, c, n;
    cin >> a >> b >> n;
    c = (a ^ b);
    if ((n % 3) == 0) {
        cout << a <<endl;
    } else if ((n % 3) == 1) {
        cout << b <<endl;
    } else {
        cout << c <<endl;
    }

    return 0;
}
0