結果

問題 No.64 XORフィボナッチ数列
ユーザー RCCW
提出日時 2017-02-02 21:20:44
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
WA  
実行時間 -
コード長 198 bytes
コンパイル時間 1,401 ms
コンパイル使用メモリ 158,776 KB
実行使用メモリ 6,820 KB
最終ジャッジ日時 2024-12-24 03:55:29
合計ジャッジ時間 2,138 ms
ジャッジサーバーID
(参考情報)
judge1 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1 WA * 2
other AC * 5 WA * 6
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;

int main() {
long long n,m,a=0;
cin>>n>>m>>a;

long long f[]={0};
f[0]=n;
f[1]=m;

for(int i=2;i<=a;i++){
f[i]=f[i-2]^f[i-1];

}
cout <<f[a]<<endl;
}

0