Took me a while to debug since I am not familiar with Ruby at all. For some reason, res.sum is not supported.
Removing `res.sum == amount &&` from valid_res?(res, amount) resolve the problem Also you don't need to do that check because it is always true anyway. Also res[i] will never be 4, so the `if res[1] == 4` block will never be run anyway. -- 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 [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/google-code/c71cf82d-d6cf-41b1-b6be-b3f915e9384d%40googlegroups.com.
