본문 바로가기

Programming/Project Euler17

Project Euler #11 : Largest product in a grid(Brute Force) This problem is actually hard to find efficient algorithms. Difficulty rating is 5%. I tried to solve it using the greed algorithm, but the greed algorithm doesn't always give the best results, but it's hard to expect a speedup because of the sorting time. Because sorting 400 data itself is basically more asymptotic than it is to compute all the products sequentially. I thought there was nothing.. 2020. 1. 26.
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.
508. Project Euler #508 : integers in base i-1 This problem's solvers are under 100. This is very hard problem, so I can't describe detail solving method in this blog. This problem is. Consider the Gaussian integer i-1. A base i-1 representation of a Gaussian integer a+bi is a finite sequence of digits dn-1dn-2...d1d0 such that:a+bi = dn-1(i-1)n-1 + dn-2(i-1)n-2 + ... + d1(i-1) + d0Each dk is in {0,1}There are no leading zeroes, i.e. dn-1 ≠ .. 2015. 5. 2.
510. Project Euler #510 : Tangent circles. This is a recent problem, so not now, difficulty rating is not determined. I think difficulty rating is about 50%. At my middle school hood, math teacher said that geometry problem can be solved if you draw lines properly. This problem is sam. This picture is that added lines and triangles on original problem image. Make repairs to the line L in circle A, make repairs to the line L in circle B, .. 2015. 4. 22.