結果
問題 |
No.64 XORフィボナッチ数列
|
ユーザー |
|
提出日時 | 2017-05-03 19:01:10 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
TLE
|
実行時間 | - |
コード長 | 296 bytes |
コンパイル時間 | 399 ms |
コンパイル使用メモリ | 55,968 KB |
実行使用メモリ | 10,144 KB |
最終ジャッジ日時 | 2024-09-14 07:08:30 |
合計ジャッジ時間 | 6,999 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 6 TLE * 1 -- * 4 |
ソースコード
#include <iostream> using namespace std; int main(int argc, const char* argv[]) { uint64_t F0, F1, N, F2; cin >> F0 >> F1 >> N; if (N == 0) { cout << F0 << endl; return 0; } for (uint64_t i = 2; i <= N; i++) { F2 = F1 ^ F0; F0 = F1; F1 = F2; } cout << F1 << endl; return 0; }