結果

問題 No.29 パワーアップ
ユーザー akitsugu777akitsugu777
提出日時 2018-10-24 10:27:44
言語 Python3
(3.11.6 + numpy 1.26.0 + scipy 1.11.3)
結果
WA  
実行時間 -
コード長 300 bytes
コンパイル時間 92 ms
コンパイル使用メモリ 10,656 KB
実行使用メモリ 7,940 KB
最終ジャッジ日時 2023-08-12 06:47:13
合計ジャッジ時間 1,847 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 17 ms
7,908 KB
testcase_01 AC 18 ms
7,716 KB
testcase_02 AC 16 ms
7,724 KB
testcase_03 WA -
testcase_04 AC 15 ms
7,764 KB
testcase_05 WA -
testcase_06 WA -
testcase_07 AC 16 ms
7,844 KB
testcase_08 WA -
testcase_09 AC 16 ms
7,840 KB
testcase_10 WA -
testcase_11 WA -
testcase_12 WA -
testcase_13 AC 15 ms
7,844 KB
testcase_14 WA -
testcase_15 WA -
testcase_16 WA -
testcase_17 WA -
testcase_18 WA -
testcase_19 WA -
testcase_20 WA -
testcase_21 AC 16 ms
7,716 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())
l = [list(map(int, input().split())) for _ in range(n)]

d = {}
for i in l:
    for j in i:
        if not j in d:
            d[j] = 1
        else:
            d[j] += 1

l = list(d.values())
c = 0
for i in l:
    if i > 1:
        c += i//2

c1 = l.count(1)
c += c1 // 4

print(c)
0