結果

問題 No.29 パワーアップ
ユーザー iad_2889
提出日時 2019-05-08 04:04:45
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
AC  
実行時間 31 ms / 5,000 ms
コード長 280 bytes
コンパイル時間 288 ms
コンパイル使用メモリ 12,672 KB
実行使用メモリ 10,624 KB
最終ジャッジ日時 2024-07-02 00:24:35
合計ジャッジ時間 1,711 ms
ジャッジサーバーID
(参考情報)
judge4 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 22
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input())
power_up = 0
items = {}
for i in range(N):
    for j in input().split():
        items.setdefault(j,0)
        t = items[j] + 1
        if not t % 2:
            t = 0
            power_up+=1
        items[j] = t
power_up+=sum(items.values()) // 4
print(power_up)
0