結果
問題 |
No.118 門松列(2)
|
ユーザー |
![]() |
提出日時 | 2015-01-07 02:09:12 |
言語 | Ruby (3.4.1) |
結果 |
WA
|
実行時間 | - |
コード長 | 241 bytes |
コンパイル時間 | 181 ms |
コンパイル使用メモリ | 7,552 KB |
実行使用メモリ | 26,400 KB |
最終ジャッジ日時 | 2024-06-13 02:51:55 |
合計ジャッジ時間 | 6,741 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | WA * 1 TLE * 1 -- * 24 |
コンパイルメッセージ
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