結果

問題 No.29 パワーアップ
ユーザー colognecologne
提出日時 2022-01-23 02:22:57
言語 PyPy3
(7.3.8)
結果
AC  
実行時間 86 ms / 5,000 ms
コード長 329 bytes
コンパイル時間 276 ms
使用メモリ 75,944 KB
最終ジャッジ日時 2023-01-05 05:22:45
合計ジャッジ時間 3,757 ms
ジャッジサーバーID
(参考情報)
judge12 / judge16
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
使用メモリ
testcase_00 AC 83 ms
75,744 KB
testcase_01 AC 81 ms
75,552 KB
testcase_02 AC 85 ms
75,792 KB
testcase_03 AC 85 ms
75,944 KB
testcase_04 AC 85 ms
75,784 KB
testcase_05 AC 84 ms
75,444 KB
testcase_06 AC 83 ms
75,504 KB
testcase_07 AC 81 ms
75,548 KB
testcase_08 AC 84 ms
75,712 KB
testcase_09 AC 82 ms
75,824 KB
testcase_10 AC 85 ms
75,732 KB
testcase_11 AC 86 ms
75,904 KB
testcase_12 AC 83 ms
75,768 KB
testcase_13 AC 83 ms
75,720 KB
testcase_14 AC 82 ms
75,560 KB
testcase_15 AC 83 ms
75,728 KB
testcase_16 AC 83 ms
75,832 KB
testcase_17 AC 83 ms
75,832 KB
testcase_18 AC 82 ms
75,648 KB
testcase_19 AC 86 ms
75,720 KB
testcase_20 AC 84 ms
75,440 KB
testcase_21 AC 85 ms
75,764 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