結果

問題 No.32 貯金箱の憂鬱
コンテスト
ユーザー go_boardwalk
提出日時 2017-03-31 11:11:19
言語 Scheme
(Gauche-0.9.15)
コンパイル:
true
実行:
gosh _filename_
結果
AC  
実行時間 22 ms / 5,000 ms
コード長 293 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 54 ms
コンパイル使用メモリ 7,968 KB
実行使用メモリ 17,408 KB
最終ジャッジ日時 2026-04-03 12:30:45
合計ジャッジ時間 1,526 ms
ジャッジサーバーID
(参考情報)
judge2_0 / judge4_1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 12
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

(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