結果
問題 | No.182 新規性の虜 |
ユーザー |
![]() |
提出日時 | 2016-03-19 23:47:10 |
言語 | Ruby (3.4.1) |
結果 |
AC
|
実行時間 | 174 ms / 5,000 ms |
コード長 | 229 bytes |
コンパイル時間 | 49 ms |
コンパイル使用メモリ | 7,552 KB |
実行使用メモリ | 27,904 KB |
最終ジャッジ日時 | 2024-12-27 02:22:04 |
合計ジャッジ時間 | 4,570 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 27 |
コンパイルメッセージ
Main.rb:3: warning: assigned but unused variable - n Syntax OK
ソースコード
class Yukicoder def initialize n = gets.chomp.to_i a = gets.chomp.split(' ').map(&:to_i) hash = Hash.new(0) a.each do |num| hash[num] += 1 end puts hash.count{|k,v| v==1} end end Yukicoder.new