結果

問題 No.64 XORフィボナッチ数列
ユーザー zaichuzaichu
提出日時 2015-12-26 18:17:01
言語 C++11
(gcc 11.4.0)
結果
MLE  
実行時間 -
コード長 318 bytes
コンパイル時間 1,666 ms
コンパイル使用メモリ 162,752 KB
実行使用メモリ 814,356 KB
最終ジャッジ日時 2023-10-19 04:19:31
合計ジャッジ時間 4,102 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
4,348 KB
testcase_01 AC 2 ms
4,348 KB
testcase_02 AC 2 ms
4,348 KB
testcase_03 AC 1 ms
4,348 KB
testcase_04 AC 2 ms
4,348 KB
testcase_05 AC 2 ms
4,348 KB
testcase_06 AC 1 ms
4,348 KB
testcase_07 AC 2 ms
4,348 KB
testcase_08 AC 2 ms
4,348 KB
testcase_09 MLE -
testcase_10 -- -
testcase_11 -- -
testcase_12 -- -
testcase_13 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

#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;
}
0