Your output should match the given format and shouldn't contain extra white 
spaces

*T = int(input())*

*for i in range(1,T+1):*
*    N, B = input().split()*
*    N, B = int(N), int(B)*
*    A = []*
*    expense = 0*
*    y = 0*
*    A = [int(x) for x in input().split()]*
*    for k in range(len(A)):*
*        expense += A.pop(A.index(min(A)))*
*        if expense <= B:*
*            y += 1*
*        else:*
*            break*

*    print("Case #%(num)s: %(res)s" % {'num': i, 'res': y})*

Now it will pass Sample and Test1 but not Test2 because your code is not 
efficient enough.

-- 
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/d4955e32-301e-4c08-8ec8-92397f298696%40googlegroups.com.

Reply via email to