結果

問題 No.5 数字のブロック
ユーザー _Clay____
提出日時 2018-09-16 00:12:02
言語 Scheme
(Gauche-0.9.15)
結果
AC  
実行時間 49 ms / 5,000 ms
コード長 406 bytes
コンパイル時間 330 ms
コンパイル使用メモリ 6,948 KB
実行使用メモリ 17,664 KB
最終ジャッジ日時 2024-11-18 12:36:49
合計ジャッジ時間 2,694 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 34
権限があれば一括ダウンロードができます

ソースコード

diff #

(let* 
  ((l (string->number (read-line)))
   (n (string->number (read-line)))
   (w (sort! (map string->number (string-split (read-line) " ")))))
  (letrec ((count 
            (lambda (w l) 
              (cond 
                ((null? w) '())
                ((<= (car w) l)
                  (cons (car w) (count (cdr w) (- l (car w)))))
                (else '())))))
   (print (length (count w l)))))
0