結果

問題 No.542 1円玉と5円玉
ユーザー ducktailducktail
提出日時 2017-12-26 13:32:09
言語 Scheme
(Gauche-0.9.14)
結果
AC  
実行時間 23 ms / 2,000 ms
コード長 397 bytes
コンパイル時間 90 ms
コンパイル使用メモリ 5,296 KB
実行使用メモリ 12,436 KB
最終ジャッジ日時 2023-08-22 21:43:00
合計ジャッジ時間 1,630 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 22 ms
12,152 KB
testcase_01 AC 22 ms
12,108 KB
testcase_02 AC 22 ms
12,152 KB
testcase_03 AC 21 ms
12,184 KB
testcase_04 AC 21 ms
12,200 KB
testcase_05 AC 21 ms
12,264 KB
testcase_06 AC 22 ms
12,436 KB
testcase_07 AC 21 ms
12,292 KB
testcase_08 AC 22 ms
12,240 KB
testcase_09 AC 22 ms
12,212 KB
testcase_10 AC 21 ms
12,212 KB
testcase_11 AC 21 ms
12,156 KB
testcase_12 AC 23 ms
12,312 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

(define (main args)
  (let* ([a (read)]
         [b (read)]
         [mem (make-vector 601 #f)])
    (let loop ([x 0]
               [y 0])
      (cond [(> y b) #t]
            [(> x a) (loop 0 (+ y 1))]
            [else (vector-set! mem (+ x (* y 5)) #t)
                  (loop (+ x 1) y)]))
    (vector-set! mem 0 #f)
    (vector-for-each-with-index (lambda (i v) (if v (print i))) mem))
  0)
0