結果

問題 No.5 数字のブロック
ユーザー MiyamonYMiyamonY
提出日時 2019-09-03 01:21:30
言語 Scheme
(Gauche-0.9.14)
結果
AC  
実行時間 36 ms / 5,000 ms
コード長 319 bytes
コンパイル時間 74 ms
コンパイル使用メモリ 5,376 KB
実行使用メモリ 14,040 KB
最終ジャッジ日時 2023-08-22 22:25:22
合計ジャッジ時間 2,411 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 17 ms
11,884 KB
testcase_01 AC 18 ms
11,684 KB
testcase_02 AC 18 ms
11,676 KB
testcase_03 AC 23 ms
13,256 KB
testcase_04 AC 21 ms
12,788 KB
testcase_05 AC 25 ms
13,704 KB
testcase_06 AC 22 ms
12,948 KB
testcase_07 AC 21 ms
12,828 KB
testcase_08 AC 23 ms
13,000 KB
testcase_09 AC 20 ms
12,108 KB
testcase_10 AC 25 ms
13,672 KB
testcase_11 AC 22 ms
12,872 KB
testcase_12 AC 23 ms
13,340 KB
testcase_13 AC 24 ms
13,540 KB
testcase_14 AC 18 ms
11,692 KB
testcase_15 AC 18 ms
11,868 KB
testcase_16 AC 24 ms
13,548 KB
testcase_17 AC 35 ms
14,040 KB
testcase_18 AC 25 ms
13,924 KB
testcase_19 AC 36 ms
13,956 KB
testcase_20 AC 19 ms
11,776 KB
testcase_21 AC 18 ms
11,836 KB
testcase_22 AC 18 ms
11,832 KB
testcase_23 AC 18 ms
11,760 KB
testcase_24 AC 19 ms
11,792 KB
testcase_25 AC 19 ms
12,040 KB
testcase_26 AC 18 ms
11,680 KB
testcase_27 AC 18 ms
11,884 KB
testcase_28 AC 18 ms
11,744 KB
testcase_29 AC 23 ms
12,988 KB
testcase_30 AC 20 ms
12,348 KB
testcase_31 AC 18 ms
11,756 KB
testcase_32 AC 19 ms
11,792 KB
testcase_33 AC 19 ms
11,676 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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

(let* ((l (string->number (read-line)))
       (n (string->number (read-line)))
       (arr (map string->number (string-split (read-line) #\space))))
  (print (solve l (sort arr))))
0