結果

問題 No.64 XORフィボナッチ数列
ユーザー Kura
提出日時 2019-07-11 11:41:46
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
AC  
実行時間 2 ms / 5,000 ms
コード長 285 bytes
コンパイル時間 2,234 ms
コンパイル使用メモリ 157,400 KB
実行使用メモリ 5,248 KB
最終ジャッジ日時 2024-11-07 10:38:24
合計ジャッジ時間 2,017 ms
ジャッジサーバーID
(参考情報)
judge4 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 11
権限があれば一括ダウンロードができます

ソースコード

diff #

#include"bits/stdc++.h"
using namespace std;
int main() {
	long int a0, a1, n; cin >> a0 >> a1 >> n;
	if (n % 3 == 0) {
		cout << a0 << endl; return 0;
	}
	else if (n % 3 == 1) {
		cout << a1 << endl; return 0;
	}
	else {
		long int m = a0 ^ a1;
		cout << m << endl;
	}
}
0