結果
問題 | No.64 XORフィボナッチ数列 |
ユーザー |
![]() |
提出日時 | 2018-12-29 02:26:09 |
言語 | C++11 (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 2 ms / 5,000 ms |
コード長 | 425 bytes |
コンパイル時間 | 406 ms |
コンパイル使用メモリ | 56,160 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-10-01 15:06:43 |
合計ジャッジ時間 | 1,175 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 11 |
ソースコード
#include <iostream>#include <algorithm>#include <cstdio>#include <string>#define ll long longusing namespace std;int main(){ll f0,f1,n,tmp;cin>>f0>>f1>>n;//実験による周期性の発見// for(int i=0;i<n;++i){// tmp=f1;// f1=f1^f0;// f0=tmp;// cout<<f1<<endl;// }if(n%3==2) cout<<(f0^f1)<<endl;else if(n%3) cout<<f1<<endl;else cout<<f0<<endl;return 0;}