Problem: https://www.codechef.com/problems/A1

My solution:

```
def sumSearch(lst, number):
dif = number
fl = 0
index = 0
while True:
for i in range(index, len(lst)):
if lst[i] <= dif:
dif = dif - lst[i]
fl = 1
index = i+1
else: fl = 0
if dif == 0: return 'Yes'
else: return 'No'
n = input()
for i in range(int(n)):
m, t = map(int, input().split())
notes = []
for i in range(m):
notes += [int(input())]
notes = sorted(notes)
print(sumSearch(notes[::-1], t))
```

How can it even go wrong ?