結果

問題 No.182 新規性の虜
ユーザー harhogefooharhogefoo
提出日時 2016-10-12 07:58:17
言語 Ruby
(3.3.0)
結果
WA  
実行時間 -
コード長 148 bytes
コンパイル時間 129 ms
コンパイル使用メモリ 7,552 KB
実行使用メモリ 25,120 KB
最終ジャッジ日時 2024-05-01 20:10:00
合計ジャッジ時間 9,556 ms
ジャッジサーバーID
(参考情報)
judge4 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 74 ms
12,160 KB
testcase_01 AC 75 ms
12,160 KB
testcase_02 AC 80 ms
12,160 KB
testcase_03 AC 76 ms
12,160 KB
testcase_04 AC 74 ms
12,160 KB
testcase_05 AC 79 ms
12,288 KB
testcase_06 AC 74 ms
12,160 KB
testcase_07 AC 74 ms
12,288 KB
testcase_08 AC 102 ms
16,640 KB
testcase_09 AC 231 ms
19,840 KB
testcase_10 AC 203 ms
18,816 KB
testcase_11 AC 136 ms
17,664 KB
testcase_12 AC 102 ms
14,336 KB
testcase_13 AC 79 ms
12,160 KB
testcase_14 WA -
testcase_15 AC 72 ms
12,160 KB
testcase_16 WA -
testcase_17 WA -
testcase_18 TLE -
testcase_19 -- -
testcase_20 -- -
testcase_21 -- -
testcase_22 -- -
testcase_23 -- -
testcase_24 -- -
testcase_25 -- -
testcase_26 -- -
testcase_27 -- -
evil01.txt -- -
evil02.txt -- -
権限があれば一括ダウンロードができます
コンパイルメッセージ
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