結果
| 問題 |
No.118 門松列(2)
|
| ユーザー |
siman
|
| 提出日時 | 2015-01-07 02:15:31 |
| 言語 | Ruby (3.4.1) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 218 bytes |
| コンパイル時間 | 183 ms |
| コンパイル使用メモリ | 7,424 KB |
| 実行使用メモリ | 22,400 KB |
| 最終ジャッジ日時 | 2024-06-13 02:52:19 |
| 合計ジャッジ時間 | 4,810 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 4 WA * 22 |
コンパイルメッセージ
Main.rb:3: warning: assigned but unused variable - n Main.rb:6: warning: assigned but unused variable - count Syntax OK
ソースコード
class A
def initialize
n = gets.chomp.to_i
a = gets.chomp.split(' ').map(&:to_i)
count = 0
puts (a.uniq.combination(3).count * a.uniq.map{|i| a.count(i)}.inject(:*)) % (10 ** 9 + 7)
end
end
A.new
siman