Recent postings
-
Project Euler
[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..
-
Project Euler
[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..
-
BOJ
[C/C++] BOJ #1037 - Divisors
BOJ #1037 is a problem related to divisors and number properties. The problem provides a list of divisors of a certain positive integer N, except for 1 and N itself. The task is to determine the actual value of N using only the given divisors. The key observation is that the smallest and largest divisors in the given list, when multiplied together, yield N. This is because if all the divisors ar..
-
Project Euler
[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..
-
Project Euler
[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..