結果
| 問題 |
No.662 スロットマシーン
|
| コンテスト | |
| ユーザー |
horiesiniti
|
| 提出日時 | 2018-01-18 07:17:19 |
| 言語 | Ruby (3.4.1) |
| 結果 |
AC
|
| 実行時間 | 110 ms / 2,000 ms |
| コード長 | 384 bytes |
| コンパイル時間 | 51 ms |
| コンパイル使用メモリ | 7,296 KB |
| 実行使用メモリ | 12,416 KB |
| 最終ジャッジ日時 | 2024-12-24 10:58:09 |
| 合計ジャッジ時間 | 2,588 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 19 |
コンパイルメッセージ
Syntax OK
ソースコード
hs={}
arr=[]
5.times{
a,b=gets.split
hs[a]=b.to_i
arr<<a
}
ls1=Hash.new(0)
ls2=Hash.new(0)
ls3=Hash.new(0)
n1=gets.to_i
n1.times{
ls1[gets.chomp]+=1
}
n2=gets.to_i
n2.times{
ls2[gets.chomp]+=1
}
n3=gets.to_i
n3.times{
ls3[gets.chomp]+=1
}
ansA=0
hs.each{|k,v|
ansA+=v*ls1[k]*ls2[k]*ls3[k]*5
}
puts ansA*1.0/(n1*n2*n3)
5.times{|i|
puts ls1[arr[i]]*ls2[arr[i]]*ls3[arr[i]]*5
}
horiesiniti