結果

問題 No.29 パワーアップ
ユーザー urutom
提出日時 2016-04-19 00:23:15
言語 Ruby
(3.4.1)
結果
AC  
実行時間 90 ms / 5,000 ms
コード長 166 bytes
コンパイル時間 134 ms
コンパイル使用メモリ 7,680 KB
実行使用メモリ 12,416 KB
最終ジャッジ日時 2024-10-04 14:00:03
合計ジャッジ時間 3,292 ms
ジャッジサーバーID
(参考情報)
judge5 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 22
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

items=Array.new(11,0)
gets.to_i.times{
	gets.split.map(&:to_i).each{|a|items[a]+=1}
}
ans=0
residue=0
items.each{|num|
	ans+=num/2
	residue+=num%2
}
p ans+(residue/4)
0