結果
| 問題 |
No.64 XORフィボナッチ数列
|
| コンテスト | |
| ユーザー |
Yut176
|
| 提出日時 | 2016-10-05 15:09:18 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
RE
|
| 実行時間 | - |
| コード長 | 409 bytes |
| コンパイル時間 | 646 ms |
| コンパイル使用メモリ | 74,032 KB |
| 実行使用メモリ | 6,824 KB |
| 最終ジャッジ日時 | 2024-11-21 17:18:53 |
| 合計ジャッジ時間 | 1,627 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 7 RE * 4 |
ソースコード
#include<iostream>
#include<algorithm>
#include<cstdio>
#include<cstdlib>
#include<vector>
#include<map>
#include<queue>
#include<string>
#include<sstream>
#include<cmath>
using namespace std;
int main(){
long long int a, b, n;
cin >> a >> b >> n;
vector<long long int> f(n+1);
f[0] = a;
f[1] = b;
for(int i=2; i<n+1; i++){
f[i] = f[i-1] ^ f[i-2];
}
cout << f[n] << endl;
return 0;
}
Yut176