結果

問題 No.32 貯金箱の憂鬱
ユーザー muzuimuzui
提出日時 2021-11-24 22:40:59
言語 Ruby
(3.3.0)
結果
WA  
実行時間 -
コード長 339 bytes
コンパイル時間 383 ms
コンパイル使用メモリ 11,320 KB
実行使用メモリ 15,368 KB
最終ジャッジ日時 2023-09-09 15:27:00
合計ジャッジ時間 1,971 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 AC 78 ms
15,136 KB
testcase_02 AC 78 ms
15,228 KB
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
testcase_06 WA -
testcase_07 WA -
testcase_08 WA -
testcase_09 AC 77 ms
15,168 KB
testcase_10 WA -
testcase_11 WA -
権限があれば一括ダウンロードができます
コンパイルメッセージ
Main.rb:10: warning: possibly useless use of + in void context
Main.rb:17: warning: possibly useless use of + in void context
Syntax OK

ソースコード

diff #

l = gets.chomp!.to_i
m = gets.chomp!.to_i
n = gets.chomp!.to_i

count = 0
if n * 1 % 25 >= 10
  count += n
else
  m + (n * 1) / 25 
  count += (n * 1) % 25
end

if (m * 25) % 100 >= 10
  count += m
else
  l + (m * 25) / 100
  count += (m * 25) % 100 
end

if (l * 100) % 1000 >= 10
  puts count
else
  puts count += (l * 100) % 1000
end

0