結果
| 問題 | No.29 パワーアップ |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2017-11-07 18:48:59 |
| 言語 | Ruby (3.4.1) |
| 結果 |
AC
|
| 実行時間 | 77 ms / 5,000 ms |
| コード長 | 239 bytes |
| 記録 | |
| コンパイル時間 | 63 ms |
| コンパイル使用メモリ | 8,192 KB |
| 実行使用メモリ | 13,056 KB |
| 最終ジャッジ日時 | 2025-10-24 21:03:38 |
| 合計ジャッジ時間 | 2,351 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 22 |
コンパイルメッセージ
Syntax OK
ソースコード
list = Array.new
power_up = 0
gets.chomp.to_i.times { gets.chomp.split.map(&:to_i).each{ |i| list << i } }
list.uniq.each do |i|
power_up += list.count(i) / 2
list.delete(i) if list.count(i).even?
end
puts power_up + list.uniq.length / 4