結果

問題 No.29 パワーアップ
ユーザー Kaito Koike
提出日時 2018-03-28 14:52:01
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
AC  
実行時間 31 ms / 5,000 ms
コード長 423 bytes
コンパイル時間 100 ms
コンパイル使用メモリ 12,672 KB
実行使用メモリ 10,880 KB
最終ジャッジ日時 2024-06-25 13:11:00
合計ジャッジ時間 1,438 ms
ジャッジサーバーID
(参考情報)
judge5 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 22
権限があれば一括ダウンロードができます

ソースコード

diff #

defeat_times = int(input())

item_list = [0 for i in range(10)]

for t in range(defeat_times):
    item_number = list(map(int,input().split(" ")))
    for i in item_number:
        item_list[i-1] += 1


powerup_counter = 0

for (i,item)in enumerate(item_list):
    if item > 1:
        powerup_counter += int(item/2)
        item_list[i] = int(item%2)


powerup_counter += int(item_list.count(1)/4)

print(powerup_counter)
0