結果
問題 | No.32 貯金箱の憂鬱 |
ユーザー |
![]() |
提出日時 | 2016-02-17 23:21:22 |
言語 | D (dmd 2.109.1) |
結果 |
AC
|
実行時間 | 1 ms / 5,000 ms |
コード長 | 397 bytes |
コンパイル時間 | 695 ms |
コンパイル使用メモリ | 98,272 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-06-12 02:52:28 |
合計ジャッジ時間 | 1,444 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 12 |
ソースコード
import std.stdio,std.conv,std.string,std.range,std.algorithm;void main(){auto L = readln.strip.to!int;auto M = readln.strip.to!int;auto N = readln.strip.to!int;int ans;auto money = (100 * L + 25 * M + N) % 1000;foreach_reverse (coin; [1, 25, 100]){ans += money / coin;money %= coin;}ans.writeln;}