분류 전체보기 (66) 썸네일형 리스트형 [C/C++] Project Euler #22 Names Scores The problem requires calculating the total of all name scores in a given text file containing names. The steps to solve the problem are:1. Parse the input file: Read a file that contains a single line of comma-separated names, each enclosed in double quotes.2. Sort the names alphabetically: Sort the list of names in ascending order.3. Compute name scores:• Assign a score to each name based on th.. [C/C++] Project Euler #21 Amicable Numbers This problem, while not at the level of a Millennium Problem, belongs to the realm of long-standing unsolved mathematical challenges, similar to the proof that no odd perfect number exists. Many people might already be familiar with the concept of a perfect number. A perfect number is defined as a number that equals the sum of its proper divisors (excluding itself). Examples include 6 and 28, wh.. [C/C++] BOJ #1011 Fly me to the Alpha Centauri This problem is about finding the minimum number of times a warp drive needs to be activated to travel to Alpha Centauri. Though it sounds like a space exploration problem, it essentially boils down to finding the largest number 'k' where the sum 1+2+3+...+k is less than half the distance to Alpha Centauri.Warping to Alpha CentauriAlpha Centauri is located approximately 4.37 light-years away fro.. [C/C++] Project Euler #20 Factorial Digit Sum The Factorial Digit Sum problem asks you to calculate the factorial of a given number and then compute the sum of all the digits in the resulting number. For example, 10! (10 factorial) equals \(10 \times 9 \times 8 \times \cdots \times 1 = 3,628,800,\) and the sum of its digits is \(3 + 6 + 2 + 8 + 8 + 0 + 0 = 27\). The problem specifically challenges you to find the sum of the digits of 100!. .. [C/C++] Project Euler #19 Counting Sundays I believe this problem is designed to test whether you can correctly identify leap years.In C/C++, you can easily solve this problem using the `mktime()` function in the `time.h` header file. However, I tried to find a slightly different approach. (When using the `mktime()` function, I wonder if leap seconds are also calculated. The day of the week for 0:00:00 on the 1st day of the month in year.. [C/C++] Project Euler #18 Maximum Path Sum I(Dynamic Programming) This program seemed interesting to me personally.Problem 18 of Project Euler is about finding the path from the top to the bottom in a triangle of numbers that gives the maximum sum.Starting from the top number in the given triangle, you move downwards by selecting one of the two adjacent numbers. The goal is to find the path that gives the maximum sum of the numbers you choose along the way.The.. [C/C++] Project Euler #17 Number Letter Counts(implementation) Project Euler Problem 17 asks you to find the total number of letters used when writing out the numbers from 1 to 1000 in English words.For example, the number 342 is written as "three hundred and forty-two" and 115 as "one hundred and fifteen". Spaces and hyphens are not included in the letter count.The problem is to determine the total number of letters used when writing out all the numbers fr.. [C/C++] #1010 Building bridges(combination) The Baekjoon Problem #1010 “Building Bridges” requires a certain understanding of the concept of combinations in probability and statistics. On one side of the river, there are N sites, and on the other side, there are M sites. The goal is to build bridges connecting the N sites on the left side to M sites on the right side, ensuring that the bridges do not cross each other. The question a.. [C/C++] Project Euler #16 Power Digit Sum(BigInteger) The program essentially revolves around whether you can use a Big Integer implementation or not.Many programming languages natively support Big Integer types, which greatly influences the implementation difficulty depending on the language.The task is straightforward: compute \(2^{1000}\), and then sum all the digits of the resulting number.For instance, if you use Python, this problem can be so.. [C/C++] Project Euler #15 Counting fractions(Combination) This problem is about calculating paths in a grid. Here is the explanation and requirements:Problem Statement:Given a two-dimensional grid, you need to calculate the number of distinct paths from the top-left corner to the bottom-right corner. The movement is restricted to only rightward or downward directions. The size of the grid is \(n \times n\) , and the goal is to compute the total number.. 이전 1 2 3 4 5 6 7 다음