結果
問題 | No.64 XORフィボナッチ数列 |
ユーザー |
![]() |
提出日時 | 2020-10-21 12:36:27 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 3 ms / 5,000 ms |
コード長 | 369 bytes |
コンパイル時間 | 1,967 ms |
コンパイル使用メモリ | 191,964 KB |
最終ジャッジ日時 | 2025-01-15 12:13:50 |
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 11 |
ソースコード
#include <bits/stdc++.h> #define fastIO (cin.tie(0), cout.tie(0), ios::sync_with_stdio(false)) #define llint long long int using namespace std; int main() { fastIO; llint f0, f1, n; cin >> f0 >> f1 >> n; if (n % 3 == 0) { cout << f0 << '\n'; } else if (n % 3 == 1) { cout << f1 << '\n'; } else { cout << (f0 ^ f1) << '\n'; } return 0; }