結果
問題 | No.64 XORフィボナッチ数列 |
ユーザー |
![]() |
提出日時 | 2021-03-28 18:30:02 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 5,000 ms |
コード長 | 330 bytes |
コンパイル時間 | 1,794 ms |
コンパイル使用メモリ | 191,188 KB |
最終ジャッジ日時 | 2025-01-20 00:18:35 |
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 11 |
ソースコード
#include <bits/stdc++.h>using namespace std;typedef long long ll;#define rep(i,n) for(int i=0;i<n;i++)typedef pair<int,int>P;int main(){ll f0,f1,f2,n;cin>>f0>>f1>>n;f2=(f0^f1);if(n%3==0){cout<<f0<<endl;}else if(n%3==1){cout<<f1<<endl;}else if(n%3==2){cout<<f2<<endl;}return 0;}