結果
問題 |
No.29 パワーアップ
|
ユーザー |
|
提出日時 | 2017-11-07 18:48:59 |
言語 | Ruby (3.4.1) |
結果 |
AC
|
実行時間 | 108 ms / 5,000 ms |
コード長 | 239 bytes |
コンパイル時間 | 45 ms |
コンパイル使用メモリ | 7,552 KB |
実行使用メモリ | 12,288 KB |
最終ジャッジ日時 | 2024-11-24 04:51:48 |
合計ジャッジ時間 | 2,901 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
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