2011/12/21 Luke Pebody <[email protected]>: > For sheer expressiveness reasons, I would choose something like Python's > >> print sum([int(char) for char in "142857"]) > 27
But the point gere is to find a fast algorithm, you need a low level language to do so :) Thinkinf of that, if we consider the memory block containing the string to be 4-bytes aligned, we can process 4 integers in the loop and avoid a jump between each byte and only jump each four bytes. -- Jérémie MARGUERIE Étudiant à l'EPITA, ing2 "Many snake oil algorithms claim unbreakability by claiming to be a OTP. Pseudo-OTPs give pseudo-security" -- Peter Gutmann -- You received this message because you are subscribed to the Google Groups "Google Code Jam" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/google-code?hl=en.
