結果

問題 No.64 XORフィボナッチ数列
ユーザー Himatsubushin
提出日時 2021-07-06 15:28:13
言語 C
(gcc 13.3.0)
結果
TLE  
実行時間 -
コード長 297 bytes
コンパイル時間 99 ms
コンパイル使用メモリ 28,800 KB
実行使用メモリ 8,352 KB
最終ジャッジ日時 2024-07-01 12:08:52
合計ジャッジ時間 6,644 ms
ジャッジサーバーID
(参考情報)
judge4 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 6 TLE * 1 -- * 4
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <stdio.h>
#include <stdlib.h>

int main(void) {
  long a, b, c, d, i;

  scanf("%ld %ld %ld", &a, &b, &c);

  if (c == 0)
    printf("%ld\n", a);
  else {
    for (i = 1; i < c; i++) {
      d = a ^ b;
      a = b;
      b = d;
    }
    printf("%ld\n", b);
  }

  return EXIT_SUCCESS;
}
0