Programming (52) 썸네일형 리스트형 [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.. [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.. [C/C++] Project Euler #14 Longest Collatz Sequence(Dynamic Programming) Problem Description:This problem involves finding the starting number below one million that produces the longest sequence when generating a Collatz sequence.The Collatz sequence is defined by the following rules:1. For a given integer n :• If n is even, divide it by 2 ( n = n / 2 ).• If n is odd, multiply it by 3 and add 1 ( n = 3n + 1 ).2. The sequence ends when n = 1 .For example, start.. [C/C++] Project Euler #13 Large Sum(modular operation) Project Euler problem #13, titled Large Sum, is described as follows:• You are given one hundred 50-digit numbers.• Your task is to compute the sum of these 100 numbers.• Then, you must output only the first ten digits of the resulting sum.In other words, the main requirement is: “Find the first ten digits of the sum of the given one-hundred 50-digit numbers.” This problem seems to be better sol.. [C/C++] Project Euler #12 Highly Divisible Triangular Number The problem is to find the first triangular number that has over 500 divisors. A triangular number is defined as the sum of natural numbers up to n , calculated using the formula \( T_n = \frac{n(n+1)}{2} \) . The task involves calculating triangular numbers and determining their divisors until one with more than 500 divisors is found. This code was written by me.//---------------------------.. [C/C++] #1009 Fixing Distributed Processing, Efficient Problem Solving in Distributed Processing: Using Number TheoryWhen it comes to solving distributed processing problems, it is possible to solve them through brute force. However, for more efficient execution, number theory comes into play. The problem itself isn't hard to understand. Imagine you have N data points, and 10 computers sequentially process each data point one by one. The q.. 이전 1 2 3 4 5 6 다음