분류 전체보기 (59) 썸네일형 리스트형 [C/C++] BOJ #1021 - Rotating Queues The Baekjoon problem #1021 “Rotating Queue” involves using a deque to efficiently extract elements from specific positions. The goal of the problem is to calculate the minimum number of operations required to extract the desired elements in the given order. The term “operation” here refers to either rotating the deque one step to the left, one step to the right, or directly removing the first el.. [C/C++] Project Euler #38 - Pandigital Multiples In Project Euler Problem 38, the goal is to use the concepts of “pandigital numbers” and “multiplication” to find the largest number that satisfies specific conditions. A pandigital number is defined as a number in which each digit from 1 to 9 appears exactly once. For example, 192384576 is considered a pandigital number because it contains all digits from 1 to 9 without repetition. The problem .. [C/C++] Project Euler #37 - Truncatable Primes Truncatable Prime refers to a very special type of prime number. These numbers retain their primality even when digits are removed one by one from the left or from the right. For example, while a regular prime is defined as a number divisible only by 1 and itself, Truncatable Primes not only meet this condition but also require that all numbers formed by progressively removing digits remain prim.. [C/C++] BOJ #1019 - Book Page Han Ji-min loves books and works at a library. One spring night, while reading a book, she suddenly became curious about how many digits were written on the pages of the book she was flipping through. The book’s pages are numbered from page 1 to page N. Let’s calculate how many digits are written on the pages of the book she read. Although it’s a bit different from the original problem, I was.. [C/C++] Project Euler #36 - Double-base Palindromes Project Euler Problem #36 - “Double-base Palindromes” is about finding numbers that are palindromic in both decimal and binary representations. For example, 585 is a palindrome in decimal (585) and also a palindrome in binary (1001001). The task is to find such numbers, calculate their sum, and output the result.There are various ways to determine if a number is a palindrome and to generate pa.. [C/C++] Project Euler #35 - Circular Primes Project Euler’s Problem #35 deals with “circular primes.” A circular prime is defined as a prime number such that every rotation of its digits is also a prime. For example, consider 197: if you rotate its digits, you get 197, 971, and 719—all of which are prime. Therefore, 197 is a circular prime. The question asks how many such circular primes exist below 1,000,000. For reference, there are 1.. [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.. [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.. [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.. [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.. 이전 1 2 3 4 ··· 6 다음