結果

問題 No.29 パワーアップ
ユーザー 👑 colognecologne
提出日時 2022-01-23 02:22:57
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 68 ms / 5,000 ms
コード長 329 bytes
コンパイル時間 281 ms
コンパイル使用メモリ 86,708 KB
実行使用メモリ 71,460 KB
最終ジャッジ日時 2023-08-19 02:40:01
合計ジャッジ時間 2,873 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 61 ms
71,128 KB
testcase_01 AC 61 ms
71,148 KB
testcase_02 AC 60 ms
71,296 KB
testcase_03 AC 61 ms
71,400 KB
testcase_04 AC 61 ms
71,264 KB
testcase_05 AC 59 ms
71,132 KB
testcase_06 AC 60 ms
71,272 KB
testcase_07 AC 61 ms
71,132 KB
testcase_08 AC 61 ms
71,400 KB
testcase_09 AC 61 ms
71,156 KB
testcase_10 AC 60 ms
71,280 KB
testcase_11 AC 60 ms
71,332 KB
testcase_12 AC 60 ms
71,232 KB
testcase_13 AC 60 ms
71,336 KB
testcase_14 AC 61 ms
71,128 KB
testcase_15 AC 63 ms
71,252 KB
testcase_16 AC 66 ms
71,224 KB
testcase_17 AC 68 ms
71,460 KB
testcase_18 AC 66 ms
71,196 KB
testcase_19 AC 64 ms
71,276 KB
testcase_20 AC 62 ms
71,344 KB
testcase_21 AC 61 ms
71,364 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys

input = sys.stdin.readline


def main():
    N = int(input())
    count = [0]*11
    for i in range(N):
        for v in map(int, input().split()):
            count[v] += 1

    a = 0
    b = 0
    for i in count:
        a += i // 2
        b += i % 2

    print(a + b // 4)


if __name__ == '__main__':
    main()
0