본문 바로가기

Programming/Project Euler

(57)
[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:11+22+33++nnSince the result of this sum can be extremely large, the key as..
[C/C++] Project Euler #47 - Distinct Primes Factors The Project Euler #47 problem can be solved without much difficulty as long as prime factorization is performed correctly.  The difficulty level of this problem is 5%.Project Euler #47 is a problem that involves finding consecutive natural numbers with distinct prime factors. The key aspect of this problem is that four consecutive natural numbers must each have exactly four distinct prime factor..
[C/C++] Project Euler #46 - Goldbach's Other Conjecture This problem only shares a similar form with Goldbach’s famous conjecture but is fundamentally different.Goldbach’s conjecture defied the expectations of many mathematicians at the time and remains unproven to this day. (Much like the case of odd perfect numbers, which were also expected to be easily proven but still lack a proof.)The difficulty level of this problem is 5%, making it relatively ..
[C/C++] Project Euler #45 - Triangular, Pentagonal, and Hexagonal Project Euler problem #45 explores the relationships among specific numerical sequences. This problem involves the concepts of triangular numbers, pentagonal numbers, and hexagonal numbers. A triangular number is defined as the sum of natural numbers and can be expressed using the formula Tn=n(n+1)2 . A pentagonal number follows a specific pattern of growth among polygonal number..
[C/C++] Project Euler #44 - Pentagon Numbers This problem requires us to generate a special type of number called pentagonal numbers.A pentagonal number represents the number of points arranged in the shape of a pentagon.For convenience, a diagram illustrating this can be included as follows.  The formula for generating pentagonal numbers is given in the problem as follows:Pn=n(3n1)2Since pentagonal numbers increase monoto..
[C/C++] Project Euler #43 - Sub-string Divisibility This problem involves finding pandigital numbers that satisfy a specific property and computing their sum. It is considered a relatively simple problem (difficulty: 5%).Problem DescriptionA 0-9 pandigital number is a 10-digit number that contains each digit from 0 to 9 exactly once. For example, 1406357289 is a 10-digit 0-9 pandigital number. However, instead of simply generating pandigital numb..

반응형