結果

問題 No.143 豆
ユーザー RinRin
提出日時 2015-09-05 20:47:18
言語 Scheme
(Gauche-0.9.14)
結果
AC  
実行時間 20 ms / 1,000 ms
コード長 447 bytes
コンパイル時間 53 ms
コンパイル使用メモリ 5,332 KB
実行使用メモリ 11,952 KB
最終ジャッジ日時 2023-09-30 16:37:30
合計ジャッジ時間 1,529 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 19 ms
11,708 KB
testcase_01 AC 19 ms
11,640 KB
testcase_02 AC 20 ms
11,880 KB
testcase_03 AC 19 ms
11,848 KB
testcase_04 AC 19 ms
11,688 KB
testcase_05 AC 19 ms
11,772 KB
testcase_06 AC 19 ms
11,888 KB
testcase_07 AC 19 ms
11,864 KB
testcase_08 AC 20 ms
11,684 KB
testcase_09 AC 19 ms
11,952 KB
testcase_10 AC 19 ms
11,848 KB
testcase_11 AC 19 ms
11,764 KB
testcase_12 AC 18 ms
11,896 KB
testcase_13 AC 19 ms
11,628 KB
testcase_14 AC 19 ms
11,768 KB
testcase_15 AC 19 ms
11,724 KB
testcase_16 AC 19 ms
11,696 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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

(let (
      (SoyBeans (* (read) (read)))
      (F (read))
     )
  (let loop(
            (RemainingBeans SoyBeans)
            (foo (read))
           )
    (if (eof-object? foo)
        (System.out.println RemainingBeans)
        (if (> 0 (- RemainingBeans foo))
            (System.out.println -1)
            (loop (- RemainingBeans foo) (read))
        )
    )
  )
)
0