結果
問題 |
No.64 XORフィボナッチ数列
|
ユーザー |
![]() |
提出日時 | 2014-11-13 23:51:34 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 436 bytes |
コンパイル時間 | 599 ms |
コンパイル使用メモリ | 65,812 KB |
実行使用メモリ | 13,768 KB |
最終ジャッジ日時 | 2024-12-31 10:20:24 |
合計ジャッジ時間 | 25,163 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 WA * 1 |
other | AC * 6 WA * 1 TLE * 4 |
コンパイルメッセージ
main.cpp: In function ‘int main()’: main.cpp:16:10: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 16 | scanf("%lld%lld%lld",&f0,&f1,&n); | ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
ソースコード
#include <cstdio> #include <cstdlib> #include <iostream> #include <string> #include <cmath> #include <algorithm> #include <vector> #include <queue> #include <stack> using namespace std; int main(){ long long f0,f1,f2,n; scanf("%lld%lld%lld",&f0,&f1,&n); for(long long i=2;i<=n;i++){ f2=f1^f0; f0=f1; f1=f2; } cout << f1 << endl; return 0; }