結果

問題 No.64 XORフィボナッチ数列
ユーザー mine691
提出日時 2018-08-14 16:20:35
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 332 bytes
コンパイル時間 616 ms
コンパイル使用メモリ 67,836 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-09-24 08:49:27
合計ジャッジ時間 1,212 ms
ジャッジサーバーID
(参考情報)
judge1 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 9 WA * 2
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<iostream>
#include<bitset>
#include<vector>
using namespace std;
using ll = long long;


int main() {
	ll f0, f1, n;
	cin >> f0 >> f1 >> n;
	if (n == 2)cout << (f0 ^ f1) << endl;
	else if (n == 1)cout << f1 << endl;
  	else if (n == 0)cout << f0 << endl;
	else if (n % 2 == 1)cout << f0 << endl;
	else cout << f1 << endl;
}
0