結果

問題 No.5 数字のブロック
ユーザー RinRin
提出日時 2015-09-05 21:52:08
言語 Scheme
(Gauche-0.9.14)
結果
AC  
実行時間 58 ms / 5,000 ms
コード長 659 bytes
コンパイル時間 265 ms
コンパイル使用メモリ 7,072 KB
実行使用メモリ 18,816 KB
最終ジャッジ日時 2024-04-29 06:25:34
合計ジャッジ時間 2,435 ms
ジャッジサーバーID
(参考情報)
judge3 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 20 ms
15,872 KB
testcase_01 AC 21 ms
16,000 KB
testcase_02 AC 20 ms
15,872 KB
testcase_03 AC 51 ms
17,280 KB
testcase_04 AC 42 ms
17,024 KB
testcase_05 AC 44 ms
17,536 KB
testcase_06 AC 38 ms
17,024 KB
testcase_07 AC 34 ms
17,024 KB
testcase_08 AC 40 ms
17,152 KB
testcase_09 AC 24 ms
16,640 KB
testcase_10 AC 45 ms
17,792 KB
testcase_11 AC 35 ms
17,024 KB
testcase_12 AC 41 ms
17,408 KB
testcase_13 AC 47 ms
17,536 KB
testcase_14 AC 20 ms
15,872 KB
testcase_15 AC 20 ms
16,128 KB
testcase_16 AC 47 ms
17,664 KB
testcase_17 AC 58 ms
18,304 KB
testcase_18 AC 53 ms
17,792 KB
testcase_19 AC 51 ms
18,816 KB
testcase_20 AC 20 ms
16,128 KB
testcase_21 AC 21 ms
15,744 KB
testcase_22 AC 19 ms
16,128 KB
testcase_23 AC 22 ms
15,744 KB
testcase_24 AC 25 ms
16,128 KB
testcase_25 AC 26 ms
16,256 KB
testcase_26 AC 24 ms
15,872 KB
testcase_27 AC 24 ms
15,872 KB
testcase_28 AC 24 ms
15,872 KB
testcase_29 AC 46 ms
16,896 KB
testcase_30 AC 31 ms
16,768 KB
testcase_31 AC 24 ms
15,872 KB
testcase_32 AC 23 ms
16,000 KB
testcase_33 AC 24 ms
16,000 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