結果

問題 No.29 パワーアップ
ユーザー ABKZABKZ
提出日時 2021-06-17 23:00:22
言語 PyPy3
(7.9.16)
結果
AC  
実行時間 112 ms / 5,000 ms
コード長 237 bytes
コンパイル時間 1,132 ms
実行使用メモリ 76,780 KB
最終ジャッジ日時 2023-01-18 15:22:26
合計ジャッジ時間 4,102 ms
ジャッジサーバーID
(参考情報)
judge14 / judge13
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 110 ms
76,040 KB
testcase_01 AC 104 ms
75,832 KB
testcase_02 AC 104 ms
75,952 KB
testcase_03 AC 103 ms
76,092 KB
testcase_04 AC 103 ms
75,984 KB
testcase_05 AC 107 ms
76,308 KB
testcase_06 AC 109 ms
76,780 KB
testcase_07 AC 105 ms
75,936 KB
testcase_08 AC 101 ms
75,984 KB
testcase_09 AC 101 ms
76,080 KB
testcase_10 AC 106 ms
76,596 KB
testcase_11 AC 108 ms
76,532 KB
testcase_12 AC 105 ms
75,776 KB
testcase_13 AC 105 ms
76,596 KB
testcase_14 AC 112 ms
76,520 KB
testcase_15 AC 105 ms
76,620 KB
testcase_16 AC 107 ms
76,528 KB
testcase_17 AC 106 ms
75,916 KB
testcase_18 AC 110 ms
76,368 KB
testcase_19 AC 106 ms
76,648 KB
testcase_20 AC 105 ms
76,036 KB
testcase_21 AC 109 ms
76,048 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