結果

問題 No.29 パワーアップ
ユーザー Kaito Koike
提出日時 2018-03-28 14:51:18
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
WA  
実行時間 -
コード長 439 bytes
コンパイル時間 117 ms
コンパイル使用メモリ 12,672 KB
実行使用メモリ 11,008 KB
最終ジャッジ日時 2024-06-25 13:10:58
合計ジャッジ時間 1,461 ms
ジャッジサーバーID
(参考情報)
judge5 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other WA * 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)

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

print(powerup_counter)
0