結果

問題 No.29 パワーアップ
ユーザー c-yanc-yan
提出日時 2020-03-27 21:33:54
言語 Python3
(3.10.1 + numpy 1.22.3 + scipy 1.8.0)
結果
AC  
実行時間 15 ms / 5,000 ms
コード長 246 bytes
コンパイル時間 51 ms
使用メモリ 7,756 KB
最終ジャッジ日時 2023-01-17 11:52:15
合計ジャッジ時間 1,353 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
使用メモリ
testcase_00 AC 13 ms
7,672 KB
testcase_01 AC 12 ms
7,624 KB
testcase_02 AC 13 ms
7,512 KB
testcase_03 AC 13 ms
7,644 KB
testcase_04 AC 12 ms
7,644 KB
testcase_05 AC 12 ms
7,672 KB
testcase_06 AC 12 ms
7,676 KB
testcase_07 AC 11 ms
7,500 KB
testcase_08 AC 12 ms
7,752 KB
testcase_09 AC 13 ms
7,536 KB
testcase_10 AC 12 ms
7,504 KB
testcase_11 AC 12 ms
7,668 KB
testcase_12 AC 12 ms
7,532 KB
testcase_13 AC 12 ms
7,512 KB
testcase_14 AC 13 ms
7,756 KB
testcase_15 AC 13 ms
7,500 KB
testcase_16 AC 13 ms
7,624 KB
testcase_17 AC 12 ms
7,576 KB
testcase_18 AC 13 ms
7,696 KB
testcase_19 AC 13 ms
7,660 KB
testcase_20 AC 15 ms
7,568 KB
testcase_21 AC 12 ms
7,728 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input())

t = [0] * (10 + 1)
for _ in range(N):
    for i in map(int, input().split()):
        t[i] += 1

result = 0
result += sum(t[i] // 2 for i in range(1, 10 + 1))
result += sum(t[i] % 2 for i in range(1, 10 + 1)) // 4
print(result)
0