結果

問題 No.29 パワーアップ
ユーザー 👑 horiesinitihoriesiniti
提出日時 2016-06-06 10:33:43
言語 Ruby
(3.3.0)
結果
WA  
実行時間 -
コード長 220 bytes
コンパイル時間 31 ms
コンパイル使用メモリ 7,552 KB
実行使用メモリ 12,416 KB
最終ジャッジ日時 2024-04-17 05:10:20
合計ジャッジ時間 2,910 ms
ジャッジサーバーID
(参考情報)
judge4 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 91 ms
12,160 KB
testcase_01 AC 95 ms
12,288 KB
testcase_02 AC 89 ms
12,160 KB
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
testcase_06 WA -
testcase_07 WA -
testcase_08 WA -
testcase_09 AC 87 ms
12,416 KB
testcase_10 WA -
testcase_11 WA -
testcase_12 WA -
testcase_13 WA -
testcase_14 WA -
testcase_15 WA -
testcase_16 WA -
testcase_17 WA -
testcase_18 WA -
testcase_19 WA -
testcase_20 AC 86 ms
12,416 KB
testcase_21 WA -
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

n=STDIN.gets.to_i
as=[0,0,0,0,0,0,0,0,0,0,0]

n.times do |i|
	a,b,c=STDIN.gets.split(" ")
	as[a.to_i]+=1
	as[b.to_i]+=1
	as[c.to_i]+=1
end
ans=0
sum=0
10.times do |i|
	ans+=as[i]/2
	sum+=as[i]%2
end
ans+=(sum/4)
puts ans
0