結果

問題 No.64 XORフィボナッチ数列
ユーザー sk3388607083sk3388607083
提出日時 2019-01-24 17:20:37
言語 C
(gcc 12.3.0)
結果
RE  
実行時間 -
コード長 337 bytes
コンパイル時間 282 ms
コンパイル使用メモリ 28,444 KB
実行使用メモリ 4,356 KB
最終ジャッジ日時 2023-10-14 09:40:17
合計ジャッジ時間 1,620 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 0 ms
4,352 KB
testcase_01 AC 0 ms
4,348 KB
testcase_02 AC 0 ms
4,348 KB
testcase_03 AC 1 ms
4,348 KB
testcase_04 AC 0 ms
4,352 KB
testcase_05 AC 0 ms
4,352 KB
testcase_06 RE -
testcase_07 AC 0 ms
4,352 KB
testcase_08 RE -
testcase_09 RE -
testcase_10 RE -
testcase_11 RE -
testcase_12 AC 1 ms
4,348 KB
testcase_13 RE -
権限があれば一括ダウンロードができます

ソースコード

diff #

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

int main(void)
{
  int i, N;
  long int F0, F1;
  scanf("%ld %ld %d", &F0, &F1, &N);
  long int* array = (long int*)malloc(N * sizeof(long int));

  array[0] = F0;
  array[1] = F1;
  for (i = 2; i < N+1; i++)
    array[i] = array[i-1] ^ array[i-2];
  
  printf("%ld\n", array[N]);

  return 0;
}

0