結果
| 問題 |
No.182 新規性の虜
|
| コンテスト | |
| ユーザー |
wonda_t_coffee
|
| 提出日時 | 2020-01-29 11:26:25 |
| 言語 | Ruby (3.4.1) |
| 結果 |
AC
|
| 実行時間 | 179 ms / 5,000 ms |
| コード長 | 173 bytes |
| コンパイル時間 | 44 ms |
| コンパイル使用メモリ | 7,296 KB |
| 実行使用メモリ | 24,832 KB |
| 最終ジャッジ日時 | 2024-09-16 00:48:59 |
| 合計ジャッジ時間 | 5,094 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 27 |
コンパイルメッセージ
Main.rb:1: warning: assigned but unused variable - n Syntax OK
ソースコード
n = gets.chomp.to_i
a = gets.chomp.split.map(&:to_i)
h = {}
a.each do |ai|
h[ai] ||= 0
h[ai] += 1
end
ans = 0
h.keys.each do |key|
ans += 1 if h[key] == 1
end
puts ans
wonda_t_coffee