prime number (6) 썸네일형 리스트형 [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 #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 #41 - Pandigital Prime This problem has a difficulty rating of 5%. It’s not a particularly difficult problem. Let’s take a look at the problem. A number is called a pandigital number if it contains each digit from 1 to n exactly once. For example, 2143 is a 4-digit pandigital number, and it is also a prime. What is the largest n-digit pandigital prime?Since we are looking for a pandigital number, we need to use each d.. [C/C++] BOJ #1017 - Prime pairs The problem “Prime Pairs” requires finding a pair of prime numbers for a given even number n such that the sum of the two prime numbers equals n . This problem is a variation of the famous Goldbach’s conjecture, which states that every even integer greater than 2 can be expressed as the sum of two prime numbers.Problem Description:1. You are given an even number n ( \(n \geq 4\) ).2. The ta.. [C/C++] Project Euler #27 Quadratic Primes In the given quadratic formula \(n^2 + an + b\), n is an integer starting from 0, and a and b are integers satisfying the range |a| Summary:1. Find a and b such that the quadratic formula \(n^2 + an + b\) produces the maximum number of consecutive primes for n.2. Compute the product of these a and b.The quadratic formula \(n^2 + n + 41\) is a well-known example of a prime-generating quadratic. I.. 이전 1 다음