Programming (59) 썸네일형 리스트형 BOJ #1003 Fibonacci This problem was solved six months ago while solving the problems of Paekjoon Online Judgement Algorithm site. Fibonacci functions have a very simple structure, which is often mentioned as various properties are discovered. When learning the C/C ++ language, it is often discussed with the Tower of Hanoi to learn the concept of recursive functions. This question is not a high percentage of correc.. BOJ #1002 Turret. It seems that this problem was first solved after joining the Baekjun algorithm. An intellectual asked a question of the Baekjun algorithm, and I remember joining the Baekjun algorithm to answer it, and then solved some problems. At that time, I was attending Yonsei University, so I registered as Yonsei University, but it is already a few years ago. Since I had been used to the Euler project for.. 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 .. 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 ≠ .. 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, .. 10. Project Euler #10 : Sum of primes Difficulty rating is 5%. The task is to calculate all prime numbers below 2 million.The solution is straightforward: use the Sieve of Eratosthenes to find primes below 2 million.There are several algorithms to check if a number is prime, such as Miller-Rabin and AKS. However, for this problem, I believe the Sieve of Eratosthenes is the best approach. #include #include int main(){ int primes[.. 9, Project Euler #9 : Special Pythagorean triplet Difficulty rating is 5%. A Pythagorean triplet is a set of three natural numbers, a Current my project euler status. Solving problems ordered is sometimes very boring. So I am solving recent problems as possible. Solving 3-digit problems is not easy to me. The maximum difficulty level is 70% currently. Generally, solving greater than 50% is comsume 2 or 3 days. Sometimes, I gave up. Almost problems I made my own solutions. But 2 or 3 problems, I cannot find solution. For example problem #78. My best solution i.. 8. Project Euler #8 : Largest product in a series. This is a useful problem for searching substrings within a document. Hashing can be applied to search for a substring efficiently. In this problem, calculating the product is required, but special care must be taken to handle overflow and multiplication by zero.The product of the digits in a number with a base of 13 can yield a result as large as \(9^{13} = 2,541,865,828,329\). Since a 32-bit in.. 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 .. 이전 1 2 3 4 5 6 다음