結果

問題 No.29 パワーアップ
ユーザー ABKZABKZ
提出日時 2021-06-17 23:00:22
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 100 ms / 5,000 ms
コード長 237 bytes
コンパイル時間 997 ms
コンパイル使用メモリ 87,136 KB
実行使用メモリ 71,796 KB
最終ジャッジ日時 2023-09-02 09:58:46
合計ジャッジ時間 4,371 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 92 ms
71,492 KB
testcase_01 AC 94 ms
71,524 KB
testcase_02 AC 92 ms
71,288 KB
testcase_03 AC 94 ms
71,756 KB
testcase_04 AC 92 ms
71,284 KB
testcase_05 AC 94 ms
71,416 KB
testcase_06 AC 94 ms
71,592 KB
testcase_07 AC 94 ms
71,440 KB
testcase_08 AC 94 ms
71,552 KB
testcase_09 AC 92 ms
71,460 KB
testcase_10 AC 95 ms
71,644 KB
testcase_11 AC 94 ms
71,644 KB
testcase_12 AC 92 ms
71,648 KB
testcase_13 AC 94 ms
71,412 KB
testcase_14 AC 98 ms
71,764 KB
testcase_15 AC 94 ms
71,724 KB
testcase_16 AC 96 ms
71,576 KB
testcase_17 AC 94 ms
71,680 KB
testcase_18 AC 99 ms
71,716 KB
testcase_19 AC 100 ms
71,396 KB
testcase_20 AC 94 ms
71,448 KB
testcase_21 AC 95 ms
71,796 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import collections

N = int(input())
a = sum([list(map(int, input().split())) for _ in range(N)], [])

cnt = collections.Counter(a).values()

pair, rest = [sum(t) for t in list(zip(*[divmod(i, 2) for i in cnt]))]

print(pair + rest // 4)
0