結果

問題 No.32 貯金箱の憂鬱
ユーザー quilt-tailsquilt-tails
提出日時 2016-09-18 23:52:38
言語 Ruby
(3.3.0)
結果
AC  
実行時間 86 ms / 5,000 ms
コード長 213 bytes
コンパイル時間 377 ms
コンパイル使用メモリ 11,240 KB
実行使用メモリ 15,348 KB
最終ジャッジ日時 2023-09-30 08:13:58
合計ジャッジ時間 2,038 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 85 ms
15,296 KB
testcase_01 AC 85 ms
15,136 KB
testcase_02 AC 83 ms
15,140 KB
testcase_03 AC 84 ms
15,332 KB
testcase_04 AC 85 ms
15,068 KB
testcase_05 AC 85 ms
15,296 KB
testcase_06 AC 86 ms
15,348 KB
testcase_07 AC 85 ms
15,072 KB
testcase_08 AC 84 ms
15,160 KB
testcase_09 AC 86 ms
15,124 KB
testcase_10 AC 86 ms
15,348 KB
testcase_11 AC 84 ms
15,108 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

coins = $stdin.read.split(?\n).map(&:to_i)

c1 = coins[2].divmod(25)
c1mod = c1[1]
ex25c = c1[0]
c25 = (coins[1] + ex25c).divmod(4)
c25mod = c25[1]
c100mod = (coins[0] + c25[0]) % 10

puts c1mod + c25mod + c100mod
0