結果
問題 |
No.64 XORフィボナッチ数列
|
ユーザー |
![]() |
提出日時 | 2017-12-12 17:30:15 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
TLE
|
実行時間 | - |
コード長 | 374 bytes |
コンパイル時間 | 926 ms |
コンパイル使用メモリ | 82,288 KB |
実行使用メモリ | 817,920 KB |
最終ジャッジ日時 | 2024-12-14 06:02:34 |
合計ジャッジ時間 | 13,439 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 TLE * 1 |
other | AC * 7 MLE * 4 |
ソースコード
#include <iostream> #include <vector> #include <algorithm> #include <string> #include <iomanip> #include <functional> #include <cmath> using namespace std; #define lli long long int lli a, b; lli fib(lli n) { if (n == 0) return a; if (n == 1) return b; return fib(n - 1) ^ fib(n - 2); } int main() { lli n, x; cin >> a >> b >> n; cout << fib(n) << endl; return 0; }