結果

問題 No.64 XORフィボナッチ数列
ユーザー test
提出日時 2020-09-13 04:01:30
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 22 ms / 5,000 ms
コード長 294 bytes
コンパイル時間 1,647 ms
コンパイル使用メモリ 194,752 KB
最終ジャッジ日時 2025-01-14 14:22:22
ジャッジサーバーID
(参考情報)
judge5 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 11
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;

void solve() {
  unsigned long long N;
  vector<unsigned long long> v(3);
  cin >> v[0] >> v[1];
  v[2] = v[0] ^ v[1];
  cin >> N;
  cout << v[(N % 3)] << endl;
}

int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  solve();
  getchar();
}
0