結果
| 問題 | No.118 門松列(2) |
| コンテスト | |
| ユーザー |
siman
|
| 提出日時 | 2015-01-07 02:09:12 |
| 言語 | Ruby (4.0.2) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 241 bytes |
| 記録 | |
| コンパイル時間 | 59 ms |
| コンパイル使用メモリ | 9,216 KB |
| 実行使用メモリ | 37,888 KB |
| 最終ジャッジ日時 | 2026-03-05 22:11:09 |
| 合計ジャッジ時間 | 133,539 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 4 WA * 1 TLE * 21 |
コンパイルメッセージ
Main.rb:3: warning: assigned but unused variable - n Syntax OK
ソースコード
class A
def initialize
n = gets.chomp.to_i
a = gets.chomp.split(' ').map(&:to_i)
count = 0
a.uniq.combination(3) do |list|
count += list.inject(1){|sum, i| sum *= a.count(i)}
end
puts count
end
end
A.new
siman