結果
| 問題 | No.29 パワーアップ |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2017-11-07 18:48:59 |
| 言語 | Ruby (4.0.2) |
| 結果 |
AC
|
| 実行時間 | 52 ms / 5,000 ms |
| + 413µs | |
| コード長 | 239 bytes |
| 記録 | |
| コンパイル時間 | 9 ms |
| コンパイル使用メモリ | 8,832 KB |
| 実行使用メモリ | 14,720 KB |
| 最終ジャッジ日時 | 2026-07-15 21:57:04 |
| 合計ジャッジ時間 | 2,470 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| 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