結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 26 ms
12,688 KB
testcase_01 AC 27 ms
12,828 KB
testcase_02 RE -
testcase_03 AC 42 ms
14,208 KB
testcase_04 AC 45 ms
14,324 KB
testcase_05 AC 44 ms
14,256 KB
testcase_06 AC 42 ms
14,300 KB
testcase_07 AC 39 ms
14,388 KB
testcase_08 AC 41 ms
14,280 KB
testcase_09 AC 29 ms
13,976 KB
testcase_10 AC 56 ms
14,264 KB
testcase_11 AC 39 ms
14,296 KB
testcase_12 AC 42 ms
14,404 KB
testcase_13 AC 45 ms
14,220 KB
testcase_14 AC 25 ms
12,912 KB
testcase_15 AC 26 ms
13,060 KB
testcase_16 AC 44 ms
14,220 KB
testcase_17 AC 60 ms
15,932 KB
testcase_18 AC 50 ms
14,224 KB
testcase_19 AC 59 ms
15,968 KB
testcase_20 RE -
testcase_21 RE -
testcase_22 RE -
testcase_23 AC 23 ms
12,900 KB
testcase_24 AC 26 ms
13,036 KB
testcase_25 AC 26 ms
13,264 KB
testcase_26 RE -
testcase_27 RE -
testcase_28 RE -
testcase_29 AC 43 ms
14,344 KB
testcase_30 AC 29 ms
14,076 KB
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