結果

問題 No.64 XORフィボナッチ数列
ユーザー neko_the_shadowneko_the_shadow
提出日時 2017-01-15 19:34:18
言語 Scheme
(Gauche-0.9.14)
結果
AC  
実行時間 19 ms / 5,000 ms
コード長 252 bytes
コンパイル時間 63 ms
コンパイル使用メモリ 5,372 KB
実行使用メモリ 11,864 KB
最終ジャッジ日時 2023-08-23 11:16:36
合計ジャッジ時間 1,241 ms
ジャッジサーバーID
(参考情報)
judge14 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 19 ms
11,696 KB
testcase_01 AC 17 ms
11,668 KB
testcase_02 AC 17 ms
11,764 KB
testcase_03 AC 18 ms
11,656 KB
testcase_04 AC 18 ms
11,656 KB
testcase_05 AC 18 ms
11,672 KB
testcase_06 AC 18 ms
11,656 KB
testcase_07 AC 18 ms
11,652 KB
testcase_08 AC 18 ms
11,768 KB
testcase_09 AC 17 ms
11,664 KB
testcase_10 AC 18 ms
11,864 KB
testcase_11 AC 18 ms
11,736 KB
testcase_12 AC 17 ms
11,744 KB
testcase_13 AC 18 ms
11,760 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

(define (solve f0 f1 n)
    (let ((f2 (logxor f0 f1))
          (mod (modulo n 3)))
        (cond ((= mod 0) f0)
              ((= mod 1) f1)
              ((= mod 2) f2))))

(print (apply solve (map string->number (string-split (read-line) #\space))))
0