結果

問題 No.740 幻の木
ユーザー _Clay____
提出日時 2018-10-07 15:11:04
言語 Scheme
(Gauche-0.9.15)
結果
AC  
実行時間 211 ms / 2,000 ms
コード長 534 bytes
コンパイル時間 52 ms
コンパイル使用メモリ 5,120 KB
実行使用メモリ 16,000 KB
最終ジャッジ日時 2024-10-12 14:13:54
合計ジャッジ時間 1,522 ms
ジャッジサーバーID
(参考情報)
judge4 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 6
権限があれば一括ダウンロードができます

ソースコード

diff #

(define n (read))
(define m (read))
(define p (read))
(define q (read))
(define r (make-vector 12 1))
((rec (r-init i j)
  (unless (> i j)
          (begin 
            (set! (~ r (- i 1)) 2)
            (r-init (+ i 1) j)))) p (- (+ p q) 1))
(print ((rec (check rest a)
             (let1 rest1 
                   (- rest 
                      (* m 
                         (~ r (remainder a 12)))) 
                   (if (<= rest1 0)
                       (+ a 1)
                       (check rest1 (+ a 1)))))
        n 0))

0