結果
問題 | No.64 XORフィボナッチ数列 |
ユーザー |
![]() |
提出日時 | 2016-03-27 23:55:43 |
言語 | C++11 (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 1 ms / 5,000 ms |
コード長 | 318 bytes |
コンパイル時間 | 274 ms |
コンパイル使用メモリ | 22,784 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-10-02 05:32:50 |
合計ジャッジ時間 | 908 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 11 |
コンパイルメッセージ
main.cpp: In function ‘int main()’: main.cpp:5:8: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 5 | scanf("%lld %lld %lld", &f0, &f1, &n); | ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ソースコード
#include <cstdio>int main(void) {long long f0, f1, f2, n;scanf("%lld %lld %lld", &f0, &f1, &n);f2 = f0 ^ f1;switch (n % 3) {case 0:printf("%lld\n", f0);break;case 1:printf("%lld\n", f1);break;case 2:printf("%lld\n", f2);break;}return 0;}