結果

問題 No.5 数字のブロック
ユーザー RinRin
提出日時 2015-09-05 21:52:08
言語 Scheme
(Gauche-0.9.14)
結果
AC  
実行時間 49 ms / 5,000 ms
コード長 659 bytes
コンパイル時間 527 ms
コンパイル使用メモリ 7,120 KB
実行使用メモリ 13,940 KB
最終ジャッジ日時 2023-08-11 14:07:05
合計ジャッジ時間 3,119 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 18 ms
11,860 KB
testcase_01 AC 17 ms
11,884 KB
testcase_02 AC 17 ms
11,676 KB
testcase_03 AC 39 ms
13,916 KB
testcase_04 AC 30 ms
13,688 KB
testcase_05 AC 43 ms
13,928 KB
testcase_06 AC 31 ms
13,720 KB
testcase_07 AC 28 ms
13,388 KB
testcase_08 AC 37 ms
13,928 KB
testcase_09 AC 22 ms
12,580 KB
testcase_10 AC 45 ms
13,848 KB
testcase_11 AC 28 ms
13,300 KB
testcase_12 AC 41 ms
13,940 KB
testcase_13 AC 43 ms
13,796 KB
testcase_14 AC 18 ms
11,976 KB
testcase_15 AC 18 ms
13,780 KB
testcase_16 AC 43 ms
13,856 KB
testcase_17 AC 48 ms
13,936 KB
testcase_18 AC 46 ms
13,868 KB
testcase_19 AC 49 ms
13,796 KB
testcase_20 AC 17 ms
11,756 KB
testcase_21 AC 18 ms
13,748 KB
testcase_22 AC 17 ms
11,948 KB
testcase_23 AC 17 ms
11,768 KB
testcase_24 AC 19 ms
13,816 KB
testcase_25 AC 18 ms
11,836 KB
testcase_26 AC 18 ms
13,712 KB
testcase_27 AC 17 ms
11,676 KB
testcase_28 AC 17 ms
11,656 KB
testcase_29 AC 29 ms
13,676 KB
testcase_30 AC 23 ms
12,708 KB
testcase_31 AC 17 ms
11,884 KB
testcase_32 AC 16 ms
11,772 KB
testcase_33 AC 17 ms
11,744 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

(define (System.out.println x)
  (begin
    (display x)
    (newline)
  )
)

(let (
      (Capacity (read))
      (N (read))
     )
  (let loop(
            (ls '())
            (foo (read))
           )
    (if (eof-object? foo)
        (let loop2(
                   (RemainingCapacity Capacity)
                   (UsedBlocks 0)
                   (bar (sort ls <))
                  )
          (if (or (= UsedBlocks N) (< (- RemainingCapacity (car bar)) 0))
              (System.out.println UsedBlocks)
              (loop2 (- RemainingCapacity (car bar)) (+ UsedBlocks 1) (cdr bar))
          )
        )
        (loop (cons foo ls) (read))
    )
  )
)
0