From a7516e31367064f61fd883bc5e6dcbbfab07a330 Mon Sep 17 00:00:00 2001 From: Muhammad Nauman Raza Date: Wed, 15 Jan 2025 13:44:53 +0000 Subject: [PATCH] chore: remove wrong solution 2A --- solutions/python/2A.py | 45 ------------------------------------------ 1 file changed, 45 deletions(-) delete mode 100644 solutions/python/2A.py diff --git a/solutions/python/2A.py b/solutions/python/2A.py deleted file mode 100644 index 52cba47..0000000 --- a/solutions/python/2A.py +++ /dev/null @@ -1,45 +0,0 @@ -n = int(input()) - -scores = {} -orders = [] -for _ in range(n): - name, score = input().split(' ') - - orders.append([name, int(score)]) - - if name not in scores: - scores[name] = [] - scores[name].append(int(score)) - -totals = [] - -for k,v in scores.items(): - totals.append(sum(v)) - -winval = max(totals) - -winners = [k for k,v in scores.items() if sum(v) == winval] - -if len(winners) < 1: - print(winner[0]) -else: - for idx, i in enumerate(orders): - if i[0] not in winners: - del orders[idx] - for idx, i in enumerate(orders): - if i[0] not in winners: - del orders[idx] - - print(orders) - - winner = '' - durations = {} - for i in orders: - if i[0] not in durations: - durations[i[0]] = 0 - durations[i[0]] += i[1] - if durations[i[0]] == winval: - winner = i[0] - break - - print(winner)