You can change the following code

*if len(arr) == 1 and sum(arr) <= budget:*
*    return 1*


*if sum(arr) <= budget:*
*    return len(arr)*

This is because the loop below assume the sum of the array is greater than 
*budget *at some point
so you need to handle the case where the sum of the array is less than 

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 view this discussion on the web visit

Reply via email to