結果

問題 No.32 貯金箱の憂鬱
ユーザー MOD9cXWdOsRxvPyMOD9cXWdOsRxvPy
提出日時 2022-10-02 18:00:55
言語 Scheme
(Gauche-0.9.14)
結果
AC  
実行時間 18 ms / 5,000 ms
コード長 311 bytes
コンパイル時間 57 ms
コンパイル使用メモリ 5,300 KB
実行使用メモリ 11,912 KB
最終ジャッジ日時 2023-08-26 15:52:11
合計ジャッジ時間 1,761 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 18 ms
11,760 KB
testcase_01 AC 17 ms
11,912 KB
testcase_02 AC 18 ms
11,912 KB
testcase_03 AC 17 ms
11,668 KB
testcase_04 AC 16 ms
11,868 KB
testcase_05 AC 18 ms
11,692 KB
testcase_06 AC 18 ms
11,744 KB
testcase_07 AC 17 ms
11,764 KB
testcase_08 AC 18 ms
11,680 KB
testcase_09 AC 17 ms
11,676 KB
testcase_10 AC 17 ms
11,872 KB
testcase_11 AC 18 ms
11,700 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#!/usr/bin/env gosh

(define (main _)
  (let* ([l (read)]
	 [m (read)]
	 [n (read)]
	 [amt (+ (* 100 l)(* 25 m) n)])
    (let*-values
	([(r1000) (remainder amt 1000)]
	 [(d100 r100) (quotient&remainder r1000 100)]
	 [(d25 r25) (quotient&remainder r100 25)])
      (display (+ d100 d25 r25))))
  (newline)
  0)

0