結果
問題 | No.32 貯金箱の憂鬱 |
ユーザー | tshig |
提出日時 | 2016-08-03 12:13:59 |
言語 | Ruby (3.3.0) |
結果 |
AC
|
実行時間 | 82 ms / 5,000 ms |
コード長 | 386 bytes |
コンパイル時間 | 56 ms |
コンパイル使用メモリ | 11,392 KB |
実行使用メモリ | 15,260 KB |
最終ジャッジ日時 | 2023-09-30 08:10:57 |
合計ジャッジ時間 | 1,839 ms |
ジャッジサーバーID (参考情報) |
judge12 / judge11 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 79 ms
15,240 KB |
testcase_01 | AC | 79 ms
15,040 KB |
testcase_02 | AC | 79 ms
15,260 KB |
testcase_03 | AC | 80 ms
15,032 KB |
testcase_04 | AC | 81 ms
15,228 KB |
testcase_05 | AC | 78 ms
15,208 KB |
testcase_06 | AC | 81 ms
15,088 KB |
testcase_07 | AC | 81 ms
15,032 KB |
testcase_08 | AC | 82 ms
15,224 KB |
testcase_09 | AC | 81 ms
15,228 KB |
testcase_10 | AC | 81 ms
15,072 KB |
testcase_11 | AC | 82 ms
15,032 KB |
コンパイルメッセージ
Syntax OK
ソースコード
class Calc0032 def initialize(args) args = args.map { |l| l.chomp.split(/\s+/) } @l = args.shift.first.to_i @m = args.shift.first.to_i @n = args.shift.first.to_i end def run t = @l * 100 + @m * 25 + @n c100 = (t % 1000) / 100 c25 = (t % 100) / 25 c1 = t % 25 c100 + c25 + c1 end end puts Calc0032.new(STDIN.readlines).run if __FILE__ == $0