結果

問題 No.29 パワーアップ
ユーザー pypypymipypypymi
提出日時 2022-05-13 10:52:48
言語 PyPy3
(7.3.8)
結果
AC  
実行時間 112 ms / 5,000 ms
コード長 307 bytes
コンパイル時間 1,462 ms
使用メモリ 76,692 KB
最終ジャッジ日時 2023-02-20 15:37:33
合計ジャッジ時間 5,227 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
使用メモリ
testcase_00 AC 104 ms
75,828 KB
testcase_01 AC 105 ms
76,040 KB
testcase_02 AC 104 ms
75,952 KB
testcase_03 AC 103 ms
75,776 KB
testcase_04 AC 105 ms
76,048 KB
testcase_05 AC 108 ms
76,536 KB
testcase_06 AC 107 ms
76,496 KB
testcase_07 AC 105 ms
75,932 KB
testcase_08 AC 105 ms
76,100 KB
testcase_09 AC 106 ms
75,932 KB
testcase_10 AC 110 ms
76,628 KB
testcase_11 AC 112 ms
76,608 KB
testcase_12 AC 105 ms
75,840 KB
testcase_13 AC 107 ms
76,320 KB
testcase_14 AC 107 ms
76,324 KB
testcase_15 AC 110 ms
76,324 KB
testcase_16 AC 108 ms
76,500 KB
testcase_17 AC 104 ms
76,060 KB
testcase_18 AC 107 ms
76,380 KB
testcase_19 AC 107 ms
76,692 KB
testcase_20 AC 106 ms
75,928 KB
testcase_21 AC 103 ms
76,028 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

from collections import Counter
n = int(input())
array = [list(map(int,input().split())) for i in range(n)]
array = Counter(sum(array,[]))
array = sorted(array.values())[::-1]
count = 0
for i,v in enumerate(array):
    while v>=2:
        v-=2
        array[i]-=2
        count+=1
print(sum(array)//4+count)
0