結果
問題 |
No.5 数字のブロック
|
ユーザー |
![]() |
提出日時 | 2016-05-19 15:24:13 |
言語 | Scheme (Gauche-0.9.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 335 bytes |
コンパイル時間 | 90 ms |
コンパイル使用メモリ | 6,948 KB |
実行使用メモリ | 17,408 KB |
最終ジャッジ日時 | 2024-10-06 09:48:33 |
合計ジャッジ時間 | 2,132 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 3 WA * 28 RE * 3 |
ソースコード
(define ans 0) (define l (read)) (define n (read)) (define w (list)) (let loop((i n)) (set! w (cons (read) w)) (if (> i 1) (loop (- i 1)))) (sort w) (define (solve ls) (if (> l (car ls)) (set! ans (+ ans 1))) (if (> l (car ls)) (set! l (- l (car ls)))) (if (> l (car ls)) (solve (cdr ls)))) (solve w) (display ans) (newline)