結果
問題 | No.64 XORフィボナッチ数列 |
ユーザー |
|
提出日時 | 2024-03-31 01:26:00 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
RE
|
実行時間 | - |
コード長 | 371 bytes |
コンパイル時間 | 1,985 ms |
コンパイル使用メモリ | 194,988 KB |
最終ジャッジ日時 | 2025-02-20 16:04:53 |
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 7 RE * 4 |
コンパイルメッセージ
main.cpp: In function ‘int main()’: main.cpp:18:11: warning: ignoring return value of ‘int system(const char*)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 18 | system("pause"); | ~~~~~~^~~~~~~~~
ソースコード
// コピーして使う!#include <bits/stdc++.h>using namespace std;using ll = long long;using vll = vector<long long>;int main() {ll a, b, n;cin >> a >> b >> n;vll f(n + 1);f[0] = a;f[1] = b;for (int i = 2; i < f.size(); i++) {f[i] = f[i - 1] ^ f[i - 2];}cout << f[f.size() - 1] << endl;system("pause");}