結果
| 問題 | No.29 パワーアップ |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2015-10-13 19:23:41 |
| 言語 | Ruby (3.4.1) |
| 結果 |
AC
|
| 実行時間 | 100 ms / 5,000 ms |
| コード長 | 355 bytes |
| 記録 | |
| コンパイル時間 | 62 ms |
| コンパイル使用メモリ | 8,064 KB |
| 実行使用メモリ | 13,056 KB |
| 最終ジャッジ日時 | 2025-10-24 20:54:47 |
| 合計ジャッジ時間 | 3,085 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 22 |
コンパイルメッセージ
Syntax OK
ソースコード
#! ruby
# yukicoder My Practice
# author: Leonardone @ NEETSDKASU
N = gets.to_i
items = {}
powerup = 0
N.times do
abc = gets.chomp.split
abc.each do |x|
if items.include? x
powerup += 1
items.delete x
else
items[x] = 1
end
end
end
powerup += items.keys.size.div(4)
puts powerup