結果

問題 No.29 パワーアップ
ユーザー TakoKurageTakoKurage
提出日時 2020-02-08 23:43:46
言語 Python3
(3.10.1 + numpy 1.22.3 + scipy 1.8.0)
結果
AC  
実行時間 19 ms / 5,000 ms
コード長 210 bytes
コンパイル時間 64 ms
使用メモリ 8,072 KB
最終ジャッジ日時 2022-11-24 14:38:10
合計ジャッジ時間 1,820 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
使用メモリ
testcase_00 AC 19 ms
7,916 KB
testcase_01 AC 18 ms
7,868 KB
testcase_02 AC 18 ms
7,832 KB
testcase_03 AC 18 ms
7,968 KB
testcase_04 AC 17 ms
7,868 KB
testcase_05 AC 17 ms
8,016 KB
testcase_06 AC 19 ms
7,832 KB
testcase_07 AC 18 ms
7,920 KB
testcase_08 AC 18 ms
7,844 KB
testcase_09 AC 18 ms
7,924 KB
testcase_10 AC 18 ms
7,836 KB
testcase_11 AC 18 ms
7,980 KB
testcase_12 AC 18 ms
7,964 KB
testcase_13 AC 17 ms
8,072 KB
testcase_14 AC 17 ms
7,972 KB
testcase_15 AC 18 ms
7,964 KB
testcase_16 AC 18 ms
8,008 KB
testcase_17 AC 18 ms
8,004 KB
testcase_18 AC 18 ms
8,028 KB
testcase_19 AC 18 ms
8,020 KB
testcase_20 AC 18 ms
7,844 KB
testcase_21 AC 17 ms
8,004 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

from collections import Counter

N, *ABC = map(int, open(0).read().split())

C = Counter(ABC)

ans = 0
rem = 0
for v in C.values():
    q, r = divmod(v, 2)
    ans += q
    rem += r

ans += rem // 4

print(ans)
0