Recent postings
-
Project Euler
[C/C++] Project Euler #34 - Digit Factorials
This problem is about finding numbers that are equal to the sum of the factorials of their digits.For example, the number 145 is such a number because\[1! + 4! + 5! = 1 + 24 + 120 = 145\]This problem asks you to find the sum of all such numbers.If you've been working on Project Euler problems up to this point, you probably have some experience with extracting digits from a decimal number.In my c..
-
Project Euler
[C/C++] Project Euler #33 - Digit Cancelling Fractions
Project Euler #33 problem is about “Digit Cancelling Fractions.” This problem involves finding fractions where both the numerator and denominator are two-digit numbers and satisfy a specific condition. The condition is that when the numerator and denominator share the same digit, and this digit is “cancelled” in a simple way, the resulting fraction must still equal the original fraction.For exam..
-
BOJ
[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..
-
Project Euler
[C/C++] Project Euler #32 - Pandigital Products
Project Euler #32 is a relatively low-difficulty problem with a difficulty level of 5%.A pandigital number is a number formed by using all digits within a specific range exactly once. For example, combinations such as 123456789 or 391867254, which include all digits from 1 to 9 exactly once, are called pandigital. In this problem, the condition requires using all digits from 1 to 9 exactly once...
-
Project Euler
[C/C++] Project Euler #31 - Coin Sums
In the UK, the following coin denominations are available:• 1p, 2p, 5p, 10p, 20p, 50p, £1 (100p), £2 (200p).The goal is to find the number of unique combinations of these coins that sum to 200 pence (£2).Conditions:1. Coins can be used repeatedly as needed.2. The order of coins does not matter (e.g., {1p, 2p} is considered the same as {2p, 1p}).3. Only unique combinations should be counted. In t..