본문 바로가기

Programming

(102)
[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++] BOJ #1036 - Base 36 The problem “Baekjoon #1036 - Base 36” requires converting and maximizing a numerical value in base 36.In base 36, the digits range from 0-9 and A-Z, where ‘A’ represents 10, ‘B’ represents 11, …, and ‘Z’ represents 35. The input consists of several numbers written in base 36, and the task is to maximize the sum of these numbers by replacing at most one character (‘0’-‘Z’) with ‘Z’ (35) in all o..
[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 \(T_n = \frac{n(n+1)}{2}\) . A pentagonal number follows a specific pattern of growth among polygonal number..
[C/C++] BOJ #1032 - Command Prompt When working with files on a computer, wildcards (?) are often used to identify common patterns or to handle multiple files efficiently. In this problem, you need to determine a common pattern among multiple file names.You will be given N file names as input, and all file names have the same length. For each position in the file names, if all characters at that position are identical, you should..
[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:\[P_n = \frac{n(3n-1)}{2}\]Since 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..
[C/C++] BOJ #1026 - Treasure The problem “Treasure” (Baekjoon #1026) requires you to find the minimum possible sum of the product of two arrays, A and B.First, you are given two arrays, A and B, each containing N integers. You can rearrange the elements of A in any order, but the order of B must remain unchanged.The goal is to compute the sum of element-wise products between A and B such that the result is minimized. That i..
[C/C++] Project Euler #42 - Coded Triangle Numbers Project Euler #42 - Coded Triangle NumbersThis problem does not require a complex algorithm.As a result, its difficulty level is only 5%.The alphabetical value of a word is defined as follows:Each letter is assigned a value (A=1, B=2, C=3, …, Z=26), and the word’s alphabetical value is the sum of these values.For example, the word “SKY” has values S=19, K=11, Y=25, so its alphabetical value is 1..
[C/C++] Project Euler #41 - Pandigital Prime This problem has a difficulty rating of 5%. It’s not a particularly difficult problem. Let’s take a look at the problem. A number is called a pandigital number if it contains each digit from 1 to n exactly once. For example, 2143 is a 4-digit pandigital number, and it is also a prime. What is the largest n-digit pandigital prime?Since we are looking for a pandigital number, we need to use each d..

반응형