結果

問題 No.29 パワーアップ
ユーザー pypypymipypypymi
提出日時 2022-05-13 10:52:48
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 100 ms / 5,000 ms
コード長 307 bytes
コンパイル時間 607 ms
コンパイル使用メモリ 87,244 KB
実行使用メモリ 71,928 KB
最終ジャッジ日時 2023-09-28 13:18:42
合計ジャッジ時間 4,059 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 100 ms
71,676 KB
testcase_01 AC 94 ms
71,420 KB
testcase_02 AC 98 ms
71,744 KB
testcase_03 AC 96 ms
71,564 KB
testcase_04 AC 97 ms
71,876 KB
testcase_05 AC 97 ms
71,788 KB
testcase_06 AC 99 ms
71,424 KB
testcase_07 AC 98 ms
71,696 KB
testcase_08 AC 96 ms
71,612 KB
testcase_09 AC 96 ms
71,788 KB
testcase_10 AC 98 ms
71,568 KB
testcase_11 AC 96 ms
71,568 KB
testcase_12 AC 95 ms
71,928 KB
testcase_13 AC 95 ms
71,880 KB
testcase_14 AC 98 ms
71,648 KB
testcase_15 AC 98 ms
71,524 KB
testcase_16 AC 96 ms
71,604 KB
testcase_17 AC 94 ms
71,900 KB
testcase_18 AC 95 ms
71,672 KB
testcase_19 AC 95 ms
71,680 KB
testcase_20 AC 95 ms
71,424 KB
testcase_21 AC 95 ms
71,652 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