태그를 입력해 주세요.2 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. 7. Project Euler #7 : 10001st prime Looking for large prime numbers obviously have to use mathematical searching prime number algorithm.Sieve of Eratosthenes is good algorithm for finding small prime numbers. 10,001st prime number is small, so, sieve of Erotosthenes algorithm is enough. Algorithm itself is very simple. Hold the array space to store a few, here and put on top of each put a few on top of each.Once a small number is .. 2015. 2. 27. 이전 1 다음