結果
| 問題 |
No.64 XORフィボナッチ数列
|
| コンテスト | |
| ユーザー |
くれちー
|
| 提出日時 | 2016-08-25 08:05:19 |
| 言語 | C90 (gcc 12.3.0) |
| 結果 |
AC
|
| 実行時間 | 1 ms / 5,000 ms |
| コード長 | 214 bytes |
| コンパイル時間 | 346 ms |
| コンパイル使用メモリ | 20,480 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-11-08 02:16:06 |
| 合計ジャッジ時間 | 957 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 11 |
コンパイルメッセージ
main.c: In function ‘main’:
main.c:6:9: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
6 | scanf("%lld %lld %lld", &f0, &f1, &n);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ソースコード
#include <stdio.h>
int main() {
long long int f0, f1, n, f;
scanf("%lld %lld %lld", &f0, &f1, &n);
if (n % 3 == 0) f = f0;
else if (n % 3 == 1) f = f1;
else f = f0 ^ f1;
printf("%lld\n", f);
return 0;
}
くれちー