結果
| 問題 | No.118 門松列(2) |
| コンテスト | |
| ユーザー |
siman
|
| 提出日時 | 2015-01-07 02:30:06 |
| 言語 | Ruby (4.0.2) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 239 bytes |
| 記録 | |
| コンパイル時間 | 187 ms |
| コンパイル使用メモリ | 9,088 KB |
| 実行使用メモリ | 35,712 KB |
| 最終ジャッジ日時 | 2026-03-05 22:13:41 |
| 合計ジャッジ時間 | 143,939 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 4 TLE * 22 |
コンパイルメッセージ
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
[*(1..100)].combination(3) do |list|
count += list.map{|i| a.count(i)}.inject(:*)
end
puts count
end
end
A.new
siman