結果
問題 |
No.32 貯金箱の憂鬱
|
ユーザー |
|
提出日時 | 2025-07-06 01:56:32 |
言語 | Standard ML (MLton 20210117) |
結果 |
AC
|
実行時間 | 1 ms / 5,000 ms |
コード長 | 538 bytes |
コンパイル時間 | 8,040 ms |
コンパイル使用メモリ | 686,304 KB |
実行使用メモリ | 7,848 KB |
最終ジャッジ日時 | 2025-07-06 01:56:42 |
合計ジャッジ時間 | 9,201 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 12 |
ソースコード
fun readInt () = valOf (TextIO.scanStream (Int.scan StringCvt.DEC) TextIO.stdIn) val () = let val l = readInt () val m = readInt () val n = readInt () val totalAmountOfCoins = (100 * l + 25 * m + 1 * n) mod 1000 val numOf100 = totalAmountOfCoins div 100 val numOf25 = (totalAmountOfCoins - 100 * numOf100) div 25 val numOf1 = (totalAmountOfCoins - 100 * numOf100 - 25 * numOf25) val ans = numOf100 + numOf25 + numOf1 in print (Int.toString ans) end