Recent postings
-
BOJ
[C/C++] BOJ #1018 - Paint Chess Board Again
The Baekjoon #1018 - Paint Chess Board Again problem requires you to determine the minimum number of squares that need to be repainted on a given rectangular board so that it becomes a valid 8x8 chessboard.Problem Description:1. Input:• A board of size NxM (where N,M > 8).• Each cell of the board contains either 'W' (white) or 'B' (black).• A chessboard is valid if:• Adjacent cells (both horiz..
-
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...