結果

問題 No.64 XORフィボナッチ数列
ユーザー satonakatakumi
提出日時 2021-08-04 16:22:22
言語 C90
(gcc 12.3.0)
結果
AC  
実行時間 1 ms / 5,000 ms
コード長 223 bytes
コンパイル時間 901 ms
コンパイル使用メモリ 19,968 KB
実行使用メモリ 5,376 KB
最終ジャッジ日時 2024-09-16 15:08:58
合計ジャッジ時間 1,298 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 11
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.c: In function ‘main’:
main.c:8:5: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
    8 |     scanf("%llu %llu %llu", &f0, &f1, &N);
      |     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

ソースコード

diff #

#include <stdio.h>

typedef unsigned long long Integer;

int main(void)
{
    Integer f0, f1, N;
    scanf("%llu %llu %llu", &f0, &f1, &N);
    Integer a[3] = {f0, f1, f0 ^ f1};
    printf("%llu\n", a[N%3]);
    return 0;
}
0