結果

問題 No.32 貯金箱の憂鬱
ユーザー cielciel
提出日時 2014-11-16 19:11:14
言語 Ruby
(3.2.2)
結果
AC  
実行時間 85 ms / 5,000 ms
コード長 141 bytes
コンパイル時間 149 ms
コンパイル使用メモリ 11,464 KB
実行使用メモリ 15,212 KB
最終ジャッジ日時 2023-09-30 07:45:52
合計ジャッジ時間 1,989 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 83 ms
15,148 KB
testcase_01 AC 84 ms
15,100 KB
testcase_02 AC 82 ms
15,100 KB
testcase_03 AC 85 ms
15,212 KB
testcase_04 AC 83 ms
14,988 KB
testcase_05 AC 82 ms
15,208 KB
testcase_06 AC 83 ms
15,124 KB
testcase_07 AC 81 ms
14,984 KB
testcase_08 AC 82 ms
15,100 KB
testcase_09 AC 82 ms
15,104 KB
testcase_10 AC 82 ms
15,212 KB
testcase_11 AC 82 ms
15,200 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
/usr/bin/ruby: warning: shebang line ending with \r may cause problems
Syntax OK

ソースコード

diff #

#!/usr/bin/ruby
T=[1000,100,25,1]
s=0
$<.each_line.with_index(1).map{|e,i|s+=e.to_i*T[i]}
r=0
1.step(T.size-1){|i|r+=s%T[i-1]/T[i]}
p r
0