diff --git a/buggy.py b/buggy.py
--- a/buggy.py
+++ b/buggy.py
@@ -2,6 +2,7 @@
 
 n, k = map(int, input().split())
 A = list(map(int, input().split()))
+A = list(set(A))
 
 hq = []
 ans = set()
@@ -11,7 +12,6 @@
 
 for _ in range(k):
     u = heappop(hq)
-    print(u)
     for a in A:
         if u + a not in ans:
             heappush(hq, u + a)
