diff --git a/buggy.py b/buggy.py
--- a/buggy.py
+++ b/buggy.py
@@ -15,7 +15,7 @@
         res, top_k_sum = 0, 0
 
         pairs = [(e, s) for e, s in zip(efficiency, speed)]
-        for e, s in sorted(pairs):
+        for e, s in sorted(pairs, reverse=True):
             heapq.heappush(top_k_speeds, s)
             top_k_sum += s
 
