結果

問題 No.29 パワーアップ
ユーザー 🍡yurahuna🍡yurahuna
提出日時 2016-05-18 10:23:34
言語 Python3
(3.10.1 + numpy 1.22.3 + scipy 1.8.0)
結果
AC  
実行時間 19 ms / 5,000 ms
コード長 249 bytes
コンパイル時間 276 ms
使用メモリ 8,068 KB
最終ジャッジ日時 2022-11-29 01:54:56
合計ジャッジ時間 2,237 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
使用メモリ
testcase_00 AC 18 ms
7,952 KB
testcase_01 AC 18 ms
7,812 KB
testcase_02 AC 18 ms
8,068 KB
testcase_03 AC 18 ms
7,836 KB
testcase_04 AC 18 ms
7,804 KB
testcase_05 AC 19 ms
7,956 KB
testcase_06 AC 19 ms
7,916 KB
testcase_07 AC 18 ms
7,948 KB
testcase_08 AC 18 ms
7,976 KB
testcase_09 AC 19 ms
7,840 KB
testcase_10 AC 18 ms
7,952 KB
testcase_11 AC 18 ms
7,836 KB
testcase_12 AC 18 ms
7,920 KB
testcase_13 AC 18 ms
7,852 KB
testcase_14 AC 19 ms
8,024 KB
testcase_15 AC 19 ms
8,024 KB
testcase_16 AC 18 ms
7,920 KB
testcase_17 AC 18 ms
8,028 KB
testcase_18 AC 18 ms
8,024 KB
testcase_19 AC 18 ms
8,020 KB
testcase_20 AC 19 ms
7,992 KB
testcase_21 AC 18 ms
7,880 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

from collections import Counter
n = int(input())
cnt = Counter()
for i in range(n):
    c = map(int, input().split())
    cnt += Counter(c)

ans = 0
rem = 0
for v in cnt.values():
    ans += v // 2
    v %= 2
    rem += v
ans += rem // 4
print(ans)
0