結果
問題 |
No.64 XORフィボナッチ数列
|
ユーザー |
![]() |
提出日時 | 2014-11-11 23:36:56 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 465 bytes |
コンパイル時間 | 701 ms |
コンパイル使用メモリ | 72,228 KB |
実行使用メモリ | 6,820 KB |
最終ジャッジ日時 | 2024-12-31 09:50:50 |
合計ジャッジ時間 | 1,211 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 WA * 1 |
other | AC * 8 WA * 3 |
ソースコード
#include <iostream> #include <string> #include <vector> #include <cmath> #include <algorithm> #include <cstdlib> #include <ctime> #include <cstdio> #include <functional> #include <set> #include <sstream> #include <cctype> using namespace std; int main(){ long long f0,f1,n; cin>>f0>>f1>>n; if(n==0) cout<<f0<<endl; else if(n==1) cout<<f1<<endl; else if(n%2) cout<<(f0^f1)<<endl; else cout<<f1<<endl; return 0; }