結果
問題 | No.32 貯金箱の憂鬱 |
ユーザー | haccha |
提出日時 | 2022-06-24 21:23:55 |
言語 | Ruby (3.3.0) |
結果 |
AC
|
実行時間 | 82 ms / 5,000 ms |
コード長 | 210 bytes |
コンパイル時間 | 367 ms |
コンパイル使用メモリ | 11,292 KB |
実行使用メモリ | 15,336 KB |
最終ジャッジ日時 | 2023-08-08 11:31:09 |
合計ジャッジ時間 | 2,981 ms |
ジャッジサーバーID (参考情報) |
judge15 / judge12 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 81 ms
15,188 KB |
testcase_01 | AC | 80 ms
15,092 KB |
testcase_02 | AC | 80 ms
15,136 KB |
testcase_03 | AC | 80 ms
15,028 KB |
testcase_04 | AC | 80 ms
15,172 KB |
testcase_05 | AC | 79 ms
15,248 KB |
testcase_06 | AC | 80 ms
15,100 KB |
testcase_07 | AC | 80 ms
15,048 KB |
testcase_08 | AC | 80 ms
15,132 KB |
testcase_09 | AC | 80 ms
15,308 KB |
testcase_10 | AC | 81 ms
15,336 KB |
testcase_11 | AC | 82 ms
15,112 KB |
コンパイルメッセージ
Syntax OK
ソースコード
def exchange(l, m, n) coins = 0 div, rem = n.divmod(25) coins += rem div, rem = (m+div).divmod(4) coins += rem (l+div) % 10 + coins end l = gets.to_i m = gets.to_i n = gets.to_i p exchange(l, m, n)