結果

問題 No.29 パワーアップ
ユーザー MichirakaraMichirakara
提出日時 2022-11-28 02:30:50
言語 PyPy3
(7.3.8)
結果
AC  
実行時間 108 ms / 5,000 ms
コード長 241 bytes
コンパイル時間 255 ms
使用メモリ 76,564 KB
最終ジャッジ日時 2022-11-28 02:30:54
合計ジャッジ時間 3,843 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
使用メモリ
testcase_00 AC 95 ms
75,876 KB
testcase_01 AC 96 ms
75,780 KB
testcase_02 AC 97 ms
75,864 KB
testcase_03 AC 95 ms
75,864 KB
testcase_04 AC 95 ms
75,868 KB
testcase_05 AC 99 ms
76,472 KB
testcase_06 AC 98 ms
76,492 KB
testcase_07 AC 103 ms
75,860 KB
testcase_08 AC 102 ms
75,752 KB
testcase_09 AC 103 ms
75,916 KB
testcase_10 AC 106 ms
76,364 KB
testcase_11 AC 101 ms
76,288 KB
testcase_12 AC 97 ms
76,032 KB
testcase_13 AC 101 ms
76,532 KB
testcase_14 AC 100 ms
76,260 KB
testcase_15 AC 98 ms
76,344 KB
testcase_16 AC 98 ms
76,564 KB
testcase_17 AC 102 ms
75,848 KB
testcase_18 AC 108 ms
75,820 KB
testcase_19 AC 100 ms
76,336 KB
testcase_20 AC 96 ms
75,808 KB
testcase_21 AC 95 ms
75,804 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n=int(input())
a=[]
for i in range(n):
    b,c,d=map(int,input().split())
    a.append(b)
    a.append(c)
    a.append(d)
from collections import Counter
c=Counter(a)
amr=0
pw=0
for i in c.values():
    pw+=i//2
    amr+=i%2
print(pw+amr//4)
0