結果

問題 No.182 新規性の虜
ユーザー harhogefoo
提出日時 2016-10-12 07:58:17
言語 Ruby
(3.4.1)
結果
WA  
実行時間 -
コード長 148 bytes
コンパイル時間 58 ms
コンパイル使用メモリ 7,424 KB
実行使用メモリ 28,800 KB
最終ジャッジ日時 2024-11-22 02:30:14
合計ジャッジ時間 34,438 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 19 WA * 3 TLE * 5
権限があれば一括ダウンロードができます
コンパイルメッセージ
Main.rb:1: warning: assigned but unused variable - n
Syntax OK

ソースコード

diff #

n = gets.to_i
a = gets.chomp.split(" ").map(&:to_i).sort

(a.length - 1).times do |i|
  if a[i] == a[i+1]
    a.delete(a[i])
  end
end
puts a.length
0