結果
問題 | No.64 XORフィボナッチ数列 |
ユーザー |
![]() |
提出日時 | 2019-06-15 18:01:37 |
言語 | C++11 (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 2,225 ms / 5,000 ms |
コード長 | 229 bytes |
コンパイル時間 | 1,394 ms |
コンパイル使用メモリ | 157,652 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-11-19 05:42:41 |
合計ジャッジ時間 | 7,189 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 11 |
ソースコード
#include<bits/stdc++.h> using namespace std; int main(){ long int a,b,c; cin>>a>>b>>c; long int d; if(c==0) cout<<a<<endl; else if(c==1) cout<<b<<endl; else{ for(int i=0; i<c-1; i++){ d=a^b; a=b; b=d; } cout<<d<<endl; } }