結果

問題 No.740 幻の木
ユーザー _Clay_____Clay____
提出日時 2018-10-07 15:11:04
言語 Scheme
(Gauche-0.9.14)
結果
AC  
実行時間 193 ms / 2,000 ms
コード長 534 bytes
コンパイル時間 140 ms
コンパイル使用メモリ 5,376 KB
実行使用メモリ 16,128 KB
最終ジャッジ日時 2024-04-20 18:14:28
合計ジャッジ時間 1,989 ms
ジャッジサーバーID
(参考情報)
judge2 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 23 ms
15,872 KB
testcase_01 AC 23 ms
15,872 KB
testcase_02 AC 23 ms
16,000 KB
testcase_03 AC 39 ms
15,872 KB
testcase_04 AC 23 ms
15,872 KB
testcase_05 AC 23 ms
16,000 KB
testcase_06 AC 193 ms
15,872 KB
testcase_07 AC 23 ms
15,872 KB
testcase_08 AC 23 ms
16,128 KB
権限があれば一括ダウンロードができます

ソースコード

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