結果

問題 No.32 貯金箱の憂鬱
ユーザー zazaboonzazaboon
提出日時 2017-01-23 17:16:36
言語 Ruby
(3.3.0)
結果
AC  
実行時間 84 ms / 5,000 ms
コード長 196 bytes
コンパイル時間 222 ms
コンパイル使用メモリ 11,444 KB
実行使用メモリ 15,340 KB
最終ジャッジ日時 2023-09-30 08:21:36
合計ジャッジ時間 2,038 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 79 ms
15,108 KB
testcase_01 AC 77 ms
15,100 KB
testcase_02 AC 77 ms
15,152 KB
testcase_03 AC 78 ms
15,040 KB
testcase_04 AC 84 ms
15,124 KB
testcase_05 AC 82 ms
15,292 KB
testcase_06 AC 81 ms
15,152 KB
testcase_07 AC 79 ms
15,308 KB
testcase_08 AC 80 ms
15,124 KB
testcase_09 AC 78 ms
15,160 KB
testcase_10 AC 78 ms
15,340 KB
testcase_11 AC 78 ms
15,080 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Main.rb:10: warning: `%' after local variable or literal is interpreted as binary operator
Main.rb:10: warning: even though it seems like string literal
Syntax OK

ソースコード

diff #

ans = 0
ans += gets.chomp.to_i * 100
ans += gets.chomp.to_i * 25
ans += gets.chomp.to_i * 1
ans = ans % 1000
anans = 0
anans += ans / 100
ans = ans % 100
anans += ans / 25
anans += ans %25
p anans
0