본문 바로가기

전체 글23

10. Project Euler #10 : Sum of primes Difficulty rating is 5%. This problem is calculate the primes below 2 million. The solution is very simple. Get primes below 2 million using sieve of Eratosthenes. There are some Determining algorithms whether number is prime. Miller-rabin, AKS, etc. In order to solve this problem, I think using sieve of Eratosthenes is best. #include #include int main() { int primes[200000]; int count = 0; int6.. 2015. 4. 21.
9, Project Euler #9 : Special Pythagorean triplet Difficulty rating is 5%. A Pythagorean triplet is a set of three natural numbers, a 2015. 4. 20.
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.. 2015. 4. 16.
8. Project Euler #8 : Largest product in a series. Difficulty level is 5%. This is a good problem that can be used at searching substring in a document. In order to search a sub-string from a document, hashing can be used. At this problem, product is needed, but, It is needed to check overflow and zero multiply. 13's single digit product can make 9's power 13, 2,541,865,828,329. 32bit integer can express about 4 billion, so I used 64bit integer .. 2015. 4. 16.