Project Euler #5151 515. Project Euler #515 : Dissonant Numbers Original Problem : Let d(p,n,0) be the multiplicative inverse of n modulo prime p, defined as n × d(p,n,0) = 1 mod p. Let for k ≥ 1.Let for all primes a ≤ p = 0 ) { int64_t r = t; t = -t*rec[count]+s; s = r; } t = (t>0)?t:p+t; return t; } Nevertheless all optimization algorithms are applied to my second algorithm, It's hard to solve this problem. I guessed consuming time is 10,000 minutes which .. 2015. 5. 13. 이전 1 다음