結果

問題 No.5 数字のブロック
ユーザー MiyamonYMiyamonY
提出日時 2019-09-02 20:02:56
言語 Scheme
(Gauche-0.9.13)
結果
AC  
実行時間 25 ms / 5,000 ms
コード長 239 bytes
コンパイル時間 30 ms
コンパイル使用メモリ 5,296 KB
実行使用メモリ 13,756 KB
最終ジャッジ日時 2023-08-22 14:12:47
合計ジャッジ時間 2,201 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 16 ms
11,760 KB
testcase_01 AC 16 ms
11,672 KB
testcase_02 AC 15 ms
11,844 KB
testcase_03 AC 21 ms
12,816 KB
testcase_04 AC 21 ms
12,768 KB
testcase_05 AC 24 ms
13,220 KB
testcase_06 AC 21 ms
12,796 KB
testcase_07 AC 21 ms
12,640 KB
testcase_08 AC 22 ms
12,720 KB
testcase_09 AC 20 ms
12,208 KB
testcase_10 AC 25 ms
13,356 KB
testcase_11 AC 20 ms
12,508 KB
testcase_12 AC 22 ms
12,844 KB
testcase_13 AC 23 ms
13,152 KB
testcase_14 AC 16 ms
11,772 KB
testcase_15 AC 17 ms
11,816 KB
testcase_16 AC 23 ms
13,280 KB
testcase_17 AC 25 ms
13,612 KB
testcase_18 AC 25 ms
13,432 KB
testcase_19 AC 25 ms
13,756 KB
testcase_20 AC 17 ms
11,768 KB
testcase_21 AC 16 ms
11,876 KB
testcase_22 AC 16 ms
11,680 KB
testcase_23 AC 16 ms
11,880 KB
testcase_24 AC 16 ms
11,720 KB
testcase_25 AC 16 ms
11,736 KB
testcase_26 AC 16 ms
11,672 KB
testcase_27 AC 16 ms
11,668 KB
testcase_28 AC 16 ms
11,776 KB
testcase_29 AC 21 ms
12,816 KB
testcase_30 AC 18 ms
12,256 KB
testcase_31 AC 16 ms
11,684 KB
testcase_32 AC 17 ms
11,676 KB
testcase_33 AC 16 ms
11,708 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

(define (solve l arr)
  (if (or (null? arr) (< l (car arr)))
      0
      (+ 1 (solve (- l (car arr)) (cdr arr)))))

(let* ((l (read))
       (n (read))
       (arr (map (lambda (_) (read))
		 (iota n))))

  (print (solve l (sort arr))))
0