結果
問題 | No.64 XORフィボナッチ数列 |
ユーザー |
![]() |
提出日時 | 2022-04-29 11:19:57 |
言語 | C++17 (gcc 12.2.0 + boost 1.81.0) |
結果 |
TLE
|
実行時間 | - |
コード長 | 364 bytes |
コンパイル時間 | 663 ms |
コンパイル使用メモリ | 67,464 KB |
実行使用メモリ | 8,760 KB |
最終ジャッジ日時 | 2023-09-11 04:10:21 |
合計ジャッジ時間 | 7,333 ms |
ジャッジサーバーID (参考情報) |
judge13 / judge15 |
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 1 ms
7,476 KB |
testcase_01 | AC | 1 ms
4,380 KB |
testcase_02 | AC | 1 ms
4,376 KB |
testcase_03 | AC | 1 ms
4,380 KB |
testcase_04 | AC | 2 ms
4,380 KB |
testcase_05 | AC | 2 ms
4,380 KB |
testcase_06 | AC | 2 ms
4,376 KB |
testcase_07 | AC | 2 ms
4,376 KB |
testcase_08 | AC | 2 ms
4,380 KB |
testcase_09 | TLE | - |
testcase_10 | -- | - |
testcase_11 | -- | - |
testcase_12 | -- | - |
testcase_13 | -- | - |
ソースコード
#include <iostream> using namespace std; int main() { long long int N, F0, F1; cin >> F0 >> F1 >> N; if( N == 0 ) { cout << F0 << endl; return 0; } if( N == 1 ) { cout << F1 << endl; return 0; } long long int tmp; tmp = F0; for( long long int i = 0; i < N ; i++ ) { tmp = F0; F0 = F1; F1 = F1 ^ tmp; } cout << F0 << endl; return 0; }