結果

問題 No.5 数字のブロック
ユーザー go_boardwalkgo_boardwalk
提出日時 2017-03-31 15:20:15
言語 Scheme
(Gauche-0.9.14)
結果
WA  
実行時間 -
コード長 343 bytes
コンパイル時間 23 ms
コンパイル使用メモリ 5,216 KB
実行使用メモリ 16,168 KB
最終ジャッジ日時 2023-09-21 10:38:18
合計ジャッジ時間 2,465 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 21 ms
12,748 KB
testcase_01 AC 20 ms
12,728 KB
testcase_02 WA -
testcase_03 AC 37 ms
14,320 KB
testcase_04 AC 38 ms
14,240 KB
testcase_05 WA -
testcase_06 AC 36 ms
14,244 KB
testcase_07 AC 34 ms
14,392 KB
testcase_08 AC 35 ms
14,388 KB
testcase_09 AC 29 ms
13,988 KB
testcase_10 AC 43 ms
14,432 KB
testcase_11 AC 34 ms
14,304 KB
testcase_12 AC 36 ms
14,316 KB
testcase_13 AC 37 ms
14,252 KB
testcase_14 AC 21 ms
13,008 KB
testcase_15 WA -
testcase_16 AC 39 ms
14,320 KB
testcase_17 AC 52 ms
15,968 KB
testcase_18 AC 45 ms
14,268 KB
testcase_19 AC 54 ms
16,168 KB
testcase_20 RE -
testcase_21 WA -
testcase_22 WA -
testcase_23 AC 20 ms
12,728 KB
testcase_24 AC 22 ms
13,128 KB
testcase_25 AC 23 ms
13,176 KB
testcase_26 RE -
testcase_27 RE -
testcase_28 RE -
testcase_29 WA -
testcase_30 WA -
testcase_31 RE -
testcase_32 RE -
testcase_33 RE -
権限があれば一括ダウンロードができます

ソースコード

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