結果

問題 No.29 パワーアップ
ユーザー panapanagdfpanapanagdf
提出日時 2019-09-21 00:43:02
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 20 ms / 5,000 ms
コード長 244 bytes
コンパイル時間 145 ms
コンパイル使用メモリ 10,664 KB
実行使用メモリ 8,596 KB
最終ジャッジ日時 2023-10-13 09:18:52
合計ジャッジ時間 1,641 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 17 ms
8,568 KB
testcase_01 AC 17 ms
8,444 KB
testcase_02 AC 17 ms
8,532 KB
testcase_03 AC 18 ms
8,584 KB
testcase_04 AC 18 ms
8,416 KB
testcase_05 AC 18 ms
8,448 KB
testcase_06 AC 19 ms
8,588 KB
testcase_07 AC 19 ms
8,456 KB
testcase_08 AC 18 ms
8,592 KB
testcase_09 AC 18 ms
8,512 KB
testcase_10 AC 17 ms
8,596 KB
testcase_11 AC 18 ms
8,596 KB
testcase_12 AC 18 ms
8,468 KB
testcase_13 AC 18 ms
8,528 KB
testcase_14 AC 20 ms
8,444 KB
testcase_15 AC 18 ms
8,432 KB
testcase_16 AC 17 ms
8,520 KB
testcase_17 AC 17 ms
8,484 KB
testcase_18 AC 18 ms
8,584 KB
testcase_19 AC 18 ms
8,432 KB
testcase_20 AC 18 ms
8,444 KB
testcase_21 AC 18 ms
8,528 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import collections
a=int(input())
b=[input().split() for i in range(a)]

c=[]
for i in b:
    for j in i:
        c.append(j)
d=collections.Counter(c)
e=0
f=0

for i in d:
    e+=d[i]//2
    if d[i]%2==1:
        f+=1
        
e+=f//4
print(e)
0