結果

問題 No.64 XORフィボナッチ数列
ユーザー KuraKura
提出日時 2019-07-11 11:29:55
言語 C++11
(gcc 11.4.0)
結果
WA  
実行時間 -
コード長 214 bytes
コンパイル時間 1,062 ms
コンパイル使用メモリ 143,268 KB
実行使用メモリ 4,380 KB
最終ジャッジ日時 2023-08-07 06:48:50
合計ジャッジ時間 7,752 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ(β)

テストケース

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

ソースコード

diff #

#include"bits/stdc++.h"
using namespace std;
int main() {
	long int a0, a1, n; cin >> a0 >> a1 >> n;
	long int m;
	for (int i = 2; i <= n; i++) {
		m = a1 ^ a0;
		a0 = a1; a1 = m;
	}
	cout << m << endl;
}
0