結果

問題 No.191 供託金
ユーザー chakku
提出日時 2016-03-31 23:41:14
言語 Ruby
(3.4.1)
結果
AC  
実行時間 82 ms / 5,000 ms
コード長 166 bytes
コンパイル時間 62 ms
コンパイル使用メモリ 7,296 KB
実行使用メモリ 12,416 KB
最終ジャッジ日時 2024-11-16 22:06:52
合計ジャッジ時間 2,912 ms
ジャッジサーバーID
(参考情報)
judge3 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 23
権限があれば一括ダウンロードができます
コンパイルメッセージ
Main.rb:1: warning: assigned but unused variable - n
Syntax OK

ソースコード

diff #

n = gets.to_i
c = gets.split.map{|t| t.to_i}
sum = c.inject(0){|s,i| s+i}
sum = sum/10
ans = 0
for t in c do
    if t <= sum
        ans = ans + 30
    end
end
p ans
0