본문 바로가기

Programming/Project Euler

(72)
[C/C++] Project Euler #67 - Maximum Path Sum II Problem Overview“This is a problem with a difficulty of only about 5%, so it’s not very hard.However, it’s a problem that can be solved using basic algorithms such as the A algorithm, and it’s also applicable in many game programming scenarios.”*This suggests that while the problem is simple, it still provides a good opportunity to apply important foundational algorithms. Problems like this are ..
[C++/Python] Project Euler #66 - Diophantine equation This problem has a difficulty level of 25%, but without mathematical background, it’s extremely hard to solve.If you try to just follow the formulas mechanically, this problem is very tough to crack.In this type of indeterminate equation where the solution is not fixed, finding integer solutions is something that, apart from brute-force substitution, would be unknown to someone who has only stud..
[Python] Project Euler #65 - Convergents of e Project Euler Problem #65 is related to continued fractions. Specifically, the problem is as follows:The continued fraction expansion for the natural number e (Euler’s number) can be expressed in the following form:\[ e = [2; 1, 2, 1, 1, 4, 1, 1, 6, 1, 1, 8, 1, \dots] \]Here, the numbers inside the brackets represent the terms of the continued fraction expansion. The n-th convergent of the conti..
[C/C++] Project Euler #64 - Odd period square roots Project Euler Problem #64 is about expressing square roots as continued fractions. The difficulty of this problem is around 20%. I think the challenge lies more in the mathematical concept rather than algorithmic complexity.A similar problem of expressing square roots as continued fractions appeared previously in Problem #57: https://odev.tistory.com/entry/CPython-Project-Euler-57-Square-Root-Co..
[C/C++] Project Euler #63 - Powerful digit counts This is a problem involving powers, but unexpectedly, it’s quite easy. The difficulty level is only 5%. The problem is: How many n-digit numbers are also nth powers of some number?For example, \(16807 = 7^5\), and 16807 is a 5-digit number, which is exactly the 5th power of 7. Even a brute-force solution works just fine for this problem. First, only numbers less than 10 are worth considering as ..
[C++] Project Euler #62 - Cubic Permutations This problem is rated at a difficulty level of 15%.Surprisingly, I solved it quite easily (using a brute-force method).The problem asks for the smallest number among five different cube numbers that are made up of the same digits.To be honest, if you were to solve this problem properly, you’d need to check that exactly five such numbers exist, but I didn’t go that far.I also excluded cases where..
[C/C++] Project Euler #61 - Cyclical Figurate Numbers This problem follows directly from problem 60 and is labeled as having a 20% difficulty level, but in my case, I didn’t find it particularly hard to solve.To tackle problems involving n-gonal numbers, it’s generally effective to focus on correctly checking whether a number satisfies the condition of being an n-gonal number. That approach should be sufficient without much difficulty.In this probl..
[C/C++] Project Euler #60 - Prime Pair Sets This is the first time I’m tackling a problem with a difficulty level of 20%.Although it’s called a prime pair, there isn’t really any deep mathematical concept involved.For example, if we take the two prime numbers 3 and 7, and simply concatenate them to form 37 and 73, and if both of these numbers are also prime, then (3, 7) is considered a prime pair.Such prime pairs exist infinitely, but the..
[C/C++] Project Euler #59 - XOR Decryption This problem is rated at a 5% difficulty level, but if solved in a standard way, I believe it would be more difficult than that.The method of decrypting this kind of cipher often involves brute-force repeated substitution. While simple repeated substitution can crack the cipher, it often takes thousands or even tens of thousands of years, even with the help of tens of thousands of computers. Thi..
[C++] Project Euler #58 - Spiral Primes #58 is a problem with a difficulty level of 5%.Although the problem may appear complex at first glance, it’s actually not difficult to solve at all.The key idea is that when you arrange numbers in a spiral starting from 1, the numbers that appear on the diagonals are always odd. In that case, the important part for solving this problem is to find the ratio of primes among the odd numbers located..

반응형