結果

問題 No.32 貯金箱の憂鬱
ユーザー go_boardwalkgo_boardwalk
提出日時 2017-03-31 11:11:19
言語 Scheme
(Gauche-0.9.14)
結果
AC  
実行時間 26 ms / 5,000 ms
コード長 293 bytes
コンパイル時間 65 ms
コンパイル使用メモリ 5,220 KB
実行使用メモリ 12,812 KB
最終ジャッジ日時 2023-09-30 10:02:54
合計ジャッジ時間 1,399 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 26 ms
12,760 KB
testcase_01 AC 18 ms
11,940 KB
testcase_02 AC 25 ms
12,768 KB
testcase_03 AC 25 ms
12,780 KB
testcase_04 AC 25 ms
12,676 KB
testcase_05 AC 26 ms
12,796 KB
testcase_06 AC 26 ms
12,612 KB
testcase_07 AC 25 ms
12,684 KB
testcase_08 AC 26 ms
12,608 KB
testcase_09 AC 25 ms
12,796 KB
testcase_10 AC 25 ms
12,616 KB
testcase_11 AC 26 ms
12,812 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

(define l (read))
(define m (read))
(define n (read))
(let loop ((ans 0) (s (+ (* l 100) (* m 25) n)))
  (cond ((>= s 1000) (loop ans (mod s 1000)))
        ((>= s 100) (loop (div s 100) (mod s 100)))
        ((>= s 25) (loop (+ ans (div s 25)) (mod s 25)))
        (else (print (+ ans s)))))
0