結果
問題 |
No.64 XORフィボナッチ数列
|
ユーザー |
![]() |
提出日時 | 2015-12-26 18:17:01 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
MLE
|
実行時間 | - |
コード長 | 318 bytes |
コンパイル時間 | 1,254 ms |
コンパイル使用メモリ | 160,596 KB |
実行使用メモリ | 818,248 KB |
最終ジャッジ日時 | 2024-09-19 00:35:47 |
合計ジャッジ時間 | 3,853 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 6 MLE * 1 -- * 4 |
ソースコード
#include <bits/stdc++.h> using namespace std; int main(){ vector<long long int> f(2); long long int n; for(auto &a:f) cin >> a; cin >> n; long long int tmp; for(int i = 2; i <= n; i++){ tmp = f[i - 1] ^ f[i - 2]; f.push_back(tmp); } // for(auto a:f) cout << a << endl; cout << f[n] << endl; return 0; }