結果

問題 No.32 貯金箱の憂鬱
ユーザー quilt-tailsquilt-tails
提出日時 2016-09-18 23:52:38
言語 Ruby
(3.4.1)
結果
AC  
実行時間 95 ms / 5,000 ms
コード長 213 bytes
コンパイル時間 44 ms
コンパイル使用メモリ 7,424 KB
実行使用メモリ 12,416 KB
最終ジャッジ日時 2024-07-23 02:24:28
合計ジャッジ時間 1,730 ms
ジャッジサーバーID
(参考情報)
judge3 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 12
権限があれば一括ダウンロードができます
コンパイルメッセージ
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