結果

問題 No.5 数字のブロック
ユーザー _Clay_____Clay____
提出日時 2018-09-16 10:37:06
言語 Scheme
(Gauche-0.9.14)
結果
AC  
実行時間 38 ms / 5,000 ms
コード長 363 bytes
コンパイル時間 104 ms
コンパイル使用メモリ 5,280 KB
実行使用メモリ 14,016 KB
最終ジャッジ日時 2023-08-11 18:35:48
合計ジャッジ時間 2,123 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 18 ms
11,712 KB
testcase_01 AC 19 ms
11,732 KB
testcase_02 AC 19 ms
11,764 KB
testcase_03 AC 23 ms
12,968 KB
testcase_04 AC 22 ms
12,900 KB
testcase_05 AC 25 ms
13,588 KB
testcase_06 AC 23 ms
12,776 KB
testcase_07 AC 22 ms
12,800 KB
testcase_08 AC 24 ms
12,872 KB
testcase_09 AC 20 ms
12,144 KB
testcase_10 AC 26 ms
13,512 KB
testcase_11 AC 22 ms
12,536 KB
testcase_12 AC 24 ms
13,172 KB
testcase_13 AC 29 ms
13,328 KB
testcase_14 AC 19 ms
11,936 KB
testcase_15 AC 18 ms
11,704 KB
testcase_16 AC 25 ms
13,576 KB
testcase_17 AC 27 ms
13,812 KB
testcase_18 AC 27 ms
13,636 KB
testcase_19 AC 38 ms
14,016 KB
testcase_20 AC 18 ms
11,796 KB
testcase_21 AC 18 ms
11,688 KB
testcase_22 AC 18 ms
11,688 KB
testcase_23 AC 19 ms
11,696 KB
testcase_24 AC 18 ms
11,868 KB
testcase_25 AC 19 ms
11,904 KB
testcase_26 AC 19 ms
11,832 KB
testcase_27 AC 18 ms
11,680 KB
testcase_28 AC 18 ms
11,668 KB
testcase_29 AC 22 ms
12,704 KB
testcase_30 AC 20 ms
12,344 KB
testcase_31 AC 18 ms
11,836 KB
testcase_32 AC 18 ms
11,660 KB
testcase_33 AC 18 ms
13,756 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

(let* 
  ((l (string->number (read-line)))
   (n (string->number (read-line)))
   (w (sort! (map string->number (string-split (read-line) " ")))))
  (define (count w l a) 
          (cond 
            ((or (null? w)
                 (> (car w) l))
              a)
            (else
              (count (cdr w) (- l (car w)) (+ a 1)))))
   (print (count w l 0)))
0