Your code does not run on my local dev machine To be more specific, the following line throw a runtime exception *A.sort()*
The exception message was like *AttributeError: 'map' object has no attribute 'sort'* To fix this, you simply convert A to a list. See my code below. *def solution():* * N,B=map(int,input().split())* * A=map(int,input().split())* * A = list(A) # convert A to a list before calling sort* * A.sort()* * cout=0* * for i in A:* * if i<=B:* * B-=i* * cout+=1* * return cout* *T=int(input()) * *for x in range(1,T+1):* * print ("Case #{}: {}".format(x, solution()))* -- You received this message because you are subscribed to the Google Groups "Google Code Jam" group. To unsubscribe from this group and stop receiving emails from it, send an email to google-code+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/google-code/3c99c4ce-cdcb-4bac-af74-f2488beeb9b6%40googlegroups.com.