結果
問題 |
No.182 新規性の虜
|
ユーザー |
|
提出日時 | 2016-04-03 18:18:39 |
言語 | Ruby (3.4.1) |
結果 |
AC
|
実行時間 | 182 ms / 5,000 ms |
コード長 | 139 bytes |
コンパイル時間 | 200 ms |
コンパイル使用メモリ | 7,424 KB |
実行使用メモリ | 24,832 KB |
最終ジャッジ日時 | 2024-12-27 04:13:00 |
合計ジャッジ時間 | 5,357 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 27 |
コンパイルメッセージ
Main.rb:1: warning: assigned but unused variable - n Syntax OK
ソースコード
n = gets.to_i a = gets.chomp!.split.map(&:to_i) c = {} a.each{|ai| c[ai] ||= 0; c[ai] += 1 } puts (a.group_by{|ai| c[ai] }[1] || []).size