Programming/Project Euler (72) 썸네일형 리스트형 [C++/Python] Project Euler #57 - Square Root Convergents This problem may appear to be a math problem, but it’s actually just a simple calculation problem.It’s rated as a 5% difficulty problem on the Project Euler site.The content of the problem is that when calculating the square root of 2, it can be expressed as a continued fraction. For more about continued fractions, refer to Pell’s equation.We can express the square root of 2 in such a way using .. [C++/Python] Project Euler #56 - Powerful Digit Sum This problem is categorized as a 5% difficulty level problem, but users of programming languages without a built-in BigInt module may face the challenge of having to implement or acquire such a module. If you use a language like Python, Java, or C#, which already includes a BigInt module, the problem can be solved quite easily. The problem itself is simple:Given values of a and b less than 100, .. [C++/Python] Project Euler #55 - Lychrel Numbers This problem is also a difficulty level 5% problem.A Lychrel number is a positive integer that, when expressed in base 10 and added to its reverse, does not form a palindrome. If the result is not a palindrome, the process is repeated by reversing the number and adding again.Theoretically, since the numbers increase gradually, it is assumed that eventually a palindrome (a number that reads the s.. [C/C++] Project Euler #54 - Poker Hands I didn’t find this problem particularly difficult, but it certainly is quite tedious.On the Project Euler site, it is rated as a 10% difficulty problem.I’ve never made a poker-style game before, but determining who wins according to poker rules is the most important part of a poker game. Everything else is just the interface.This problem is quite long.Ultimately, the main point is to determine h.. [C/C++] Project Euler #53 - Combinatoric Selections This problem is a simple one. As long as you know the combination formula, it’s easy to solve.When n varies from 1 to 100, you need to calculate the number of times the combination value \(_nC_r\) exceeds one million.Even with a brute-force approach, you only need to compute combinations 10,100 times.If you know that \(_nC_r = nC{n-r}\), you can reduce the calculations by half. Because of its sy.. [C/C++] Project Euler #52 - Permuted Multiples Problem 52 is so famous that I was able to find the answer without even writing a program after just reading the problem.This problem is related to recurring decimals and prime numbers.The problem itself is not difficult, so you can solve it one way or another. It’s a 5% difficulty problem. (Problem 51 had briefly jumped to 15% difficulty.)A number like 125874, when multiplied by 2, becomes 2517.. [C/C++] Project Euler #51 - Prime Digit Replacements Project Euler Problem #51 is the first problem that doesn’t have a difficulty rating of 5%.Compared to problems #1 to #50, this one is a bit more challenging, with a difficulty rating set at 15%.The problem gives a number like 56xx3, where the x represents blank digits. By replacing each x with digits from 0 to 9, we want to find out how many of the resulting numbers are prime.For example, by re.. [C/C++] Project Euler #50 - Consecutive Prime Sum This problem itself is not particularly difficult. On the Project Euler website, its difficulty rating is listed as 5%.Personally, I did not find the problem conceptually hard. However, trying to optimize the speed required a lot of careful thought.The goal of the problem is to find the prime number within a given range that can be expressed as the sum of the most consecutive primes, where the s.. [C/C++] Project Euler #49 - Prime Permutations Project Euler #49 Prime Permutations problem may seem complex, but the actual solving process is straightforward. The difficulty level is 5%, classified as “very easy.”Three four-digit numbers are prime numbers that are permutations of each other.For example, the numbers 1487, 4817, and 8147 consist of the same four digits (1, 4, 7, 8) arranged in different orders, and each of them is a prime nu.. [C/C++] Project Euler #48 - Self Powers This problem is also an easy one.The content is quite short. The difficulty level is 5%.Project Euler problem #48, “Self Powers”, requires calculating the last 10 digits of the sum of each natural number from 1 to n raised to the power of itself. In other words, we need to compute the following sum:\[1^1 + 2^2 + 3^3 + \dots + n^n\]Since the result of this sum can be extremely large, the key as.. 이전 1 2 3 4 5 ··· 8 다음