結果

問題 No.29 パワーアップ
ユーザー MichirakaraMichirakara
提出日時 2022-11-28 02:30:50
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 42 ms / 5,000 ms
コード長 241 bytes
コンパイル時間 322 ms
コンパイル使用メモリ 82,916 KB
実行使用メモリ 55,816 KB
最終ジャッジ日時 2024-04-15 06:17:40
合計ジャッジ時間 1,731 ms
ジャッジサーバーID
(参考情報)
judge2 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 39 ms
54,368 KB
testcase_01 AC 40 ms
54,236 KB
testcase_02 AC 39 ms
53,684 KB
testcase_03 AC 40 ms
55,124 KB
testcase_04 AC 40 ms
54,488 KB
testcase_05 AC 42 ms
54,380 KB
testcase_06 AC 40 ms
55,712 KB
testcase_07 AC 38 ms
53,480 KB
testcase_08 AC 38 ms
54,748 KB
testcase_09 AC 37 ms
54,788 KB
testcase_10 AC 40 ms
55,672 KB
testcase_11 AC 40 ms
55,248 KB
testcase_12 AC 37 ms
54,428 KB
testcase_13 AC 38 ms
54,648 KB
testcase_14 AC 39 ms
54,516 KB
testcase_15 AC 41 ms
54,484 KB
testcase_16 AC 39 ms
55,816 KB
testcase_17 AC 38 ms
53,632 KB
testcase_18 AC 38 ms
54,316 KB
testcase_19 AC 39 ms
55,812 KB
testcase_20 AC 40 ms
54,268 KB
testcase_21 AC 38 ms
55,244 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