結果

問題 No.32 貯金箱の憂鬱
ユーザー nohopennohopen
提出日時 2019-02-10 13:55:20
言語 Scheme
(Gauche-0.9.14)
結果
AC  
実行時間 19 ms / 5,000 ms
コード長 421 bytes
コンパイル時間 64 ms
コンパイル使用メモリ 5,216 KB
実行使用メモリ 11,972 KB
最終ジャッジ日時 2023-09-30 13:24:55
合計ジャッジ時間 1,148 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 18 ms
11,876 KB
testcase_01 AC 19 ms
11,932 KB
testcase_02 AC 18 ms
11,784 KB
testcase_03 AC 17 ms
11,680 KB
testcase_04 AC 17 ms
11,876 KB
testcase_05 AC 18 ms
11,972 KB
testcase_06 AC 18 ms
11,776 KB
testcase_07 AC 18 ms
11,780 KB
testcase_08 AC 17 ms
11,696 KB
testcase_09 AC 18 ms
11,664 KB
testcase_10 AC 19 ms
11,876 KB
testcase_11 AC 18 ms
11,716 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

(define (judge l m n)
  (let* ((ans 0))
    (begin
      (receive (a b) (divrem n 25) (set! ans (+ ans b))
      (receive (c d) (divrem (* (+ m a) 25) 100) (set! ans (+ ans (quotient d 25)))
      (receive (e f) (divrem (* (+ l c) 100) 1000) (set! ans (+ ans (quotient f 100))))))
      (print ans))))

(define (divrem n m)
  (values (quotient n m) (remainder n m)))

(define (main args)
  (judge (read) (read) (read)) 0)
0