X*******t 发帖数: 149 | 1 1024 raised to power 202 modulo 2011
512 raised to power 225 modulo 2027
另外一个:
You are given a sequence of n numbers from {0,...,p-1}. Can you insert
operators + and * between the numbers that the expression evaluates to 0
modulo p? We use the usual convention for evaluating expressions: * has
precedence over + (thus for example 1+2*3 evaluates to 7). Describe an O(np2
) algorithm for the problem (assume, for simplicity, that arithmetic
operations on numbers from {0,...,p-1}take O(1) time).
多谢各位,能提点一下就很感谢了,书都看了,联系不上去。 | f*******n 发帖数: 12623 | | c****p 发帖数: 6474 | 3 a^n mod k = (a mod k)^n mod k
np2
【在 X*******t 的大作中提到】 : 1024 raised to power 202 modulo 2011 : 512 raised to power 225 modulo 2027 : 另外一个: : You are given a sequence of n numbers from {0,...,p-1}. Can you insert : operators + and * between the numbers that the expression evaluates to 0 : modulo p? We use the usual convention for evaluating expressions: * has : precedence over + (thus for example 1+2*3 evaluates to 7). Describe an O(np2 : ) algorithm for the problem (assume, for simplicity, that arithmetic : operations on numbers from {0,...,p-1}take O(1) time). : 多谢各位,能提点一下就很感谢了,书都看了,联系不上去。
|
|