def gf_crt2(U, M, p, E, S, K):
 v = K.zero
 for (u, m, e, s) in zip(U, M, E, S):
  v += (e * ((u * s) % m))
 return (v % p)

def gf_crt2 ( U , M , p , E , S , K ) : v = K . zero for ( u , m , e , s ) in zip ( U , M , E , S ) : v += ( e * ( ( u * s ) % m ) ) return ( v % p )
second part of the chinese remainder theorem .