But... how many such functions are there? Well, the definition given is that of a homomorphism, so F(0)=0 and the rest of the function is completely determined by F(1). Thus there are only 'm' different homomorphisms.

Unfortunately I don't think this insight leads to any better solution, other than perhaps noting that there's no point in using the lookup table for x=0.

## Error

Your reply will be screened

Your IP address will be recorded