結果

問題 No.5 数字のブロック
ユーザー go_boardwalk
提出日時 2017-03-31 15:20:15
言語 Scheme
(Gauche-0.9.15)
結果
WA  
実行時間 -
コード長 343 bytes
コンパイル時間 26 ms
コンパイル使用メモリ 6,684 KB
実行使用メモリ 19,840 KB
最終ジャッジ日時 2024-07-07 04:41:56
合計ジャッジ時間 2,249 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 20 WA * 7 RE * 7
権限があれば一括ダウンロードができます

ソースコード

diff #

(define l (string->number (read-line))) ;箱の幅
(define n (string->number (read-line)));ブロックの数
(define w (sort (map string->number (string-split (read-line) " "))))

(print (let loop ((b (car w)) (lst (cdr w)) (h l) (cnt 0))
         (if (>= b h)
              cnt
             (loop #?=(+ b (car lst)) (cdr lst) h (+ cnt 1)))))
0