結果

問題 No.5 数字のブロック
ユーザー MiyamonY
提出日時 2019-09-02 20:02:56
言語 Scheme
(Gauche-0.9.15)
結果
AC  
実行時間 39 ms / 5,000 ms
コード長 239 bytes
コンパイル時間 223 ms
コンパイル使用メモリ 6,944 KB
実行使用メモリ 17,280 KB
最終ジャッジ日時 2024-12-17 13:21:15
合計ジャッジ時間 2,629 ms
ジャッジサーバーID
(参考情報)
judge1 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 34
権限があれば一括ダウンロードができます

ソースコード

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