結果

問題 No.64 XORフィボナッチ数列
コンテスト
ユーザー neko_the_shadow
提出日時 2017-01-15 19:34:18
言語 Scheme
(Gauche-0.9.15)
コンパイル:
true
実行:
gosh _filename_
結果
AC  
実行時間 17 ms / 5,000 ms
+ 372µs
コード長 252 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 15 ms
コンパイル使用メモリ 7,852 KB
実行使用メモリ 16,384 KB
最終ジャッジ日時 2026-10-11 10:22:50
合計ジャッジ時間 1,401 ms
ジャッジサーバーID
(参考情報)
judge1_1 / judge4_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 12
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

(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