結果

問題 No.64 XORフィボナッチ数列
ユーザー トミー
提出日時 2024-03-31 02:54:22
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 3 ms / 5,000 ms
コード長 358 bytes
コンパイル時間 2,085 ms
コンパイル使用メモリ 191,796 KB
最終ジャッジ日時 2025-02-20 16:06:29
ジャッジサーバーID
(参考情報)
judge4 / judge4
外部呼び出し有り
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 11
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.cpp: In function ‘int main()’:
main.cpp:18:11: warning: ignoring return value of ‘int system(const char*)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
   18 |     system("pause");
      |     ~~~~~~^~~~~~~~~

ソースコード

diff #

// コピーして使う!
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using vll = vector<long long>;

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

    system("pause");
}
0