【Project EulerにRubyで挑戦シリーズ】問14:Longest Collatz sequence

今回の問題 Longest Collatz sequence The following iterative sequence is defined for the set of positive integers: n → n/2 (n is even) n → 3n + 1 (n is odd) […]

続きを読む

【Project EulerにRubyで挑戦シリーズ】問13:Large sum

今回の問題 Large sum Work out the first ten digits of the sum of the following one-hundred 50-digit numbers. 以下の50桁の数字100個の合計の上から10桁を求めなさい。 371072875339021 […]

続きを読む

【Project EulerにRubyで挑戦シリーズ】問12:Highly divisible triangular number

今回の問題 Highly divisible triangular number The sequence of triangle numbers is generated by adding the natural numbers. So the 7th triangle number would […]

続きを読む

【Project EulerにRubyで挑戦シリーズ】問11:Largest product in a grid

今回の問題 Largest product in a grid In the 20×20 grid below, four numbers along a diagonal line have been marked in red. 08 02 22 97 38 15 00 40 00 75 04 […]

続きを読む

【Project EulerにRubyで挑戦シリーズ】問10:Summation of primes

今回の問題 Summation of primes The sum of the primes below 10 is 2 + 3 + 5 + 7 = 17. Find the sum of all the primes below two million. 10以下の素数の和は 2 + 3 + 5 […]

続きを読む

【Project EulerにRubyで挑戦シリーズ】問9:Special Pythagorean triplet

今回の問題 Special Pythagorean triplet A Pythagorean triplet is a set of three natural numbers, a < b < c, for which, a ** 2 + b ** 2 = c ** 2 For ex […]

続きを読む

【Project EulerにRubyで挑戦シリーズ】問8:Largest product in a series

今回の問題 Largest product in a series The four adjacent digits in the 1000-digit number that have the greatest product are 9 × 9 × 8 × 9 = 5832. 731671765 […]

続きを読む

【Project EulerにRubyで挑戦シリーズ】問7:10001st prime

今回の問題 10001st prime By listing the first six prime numbers: 2, 3, 5, 7, 11, and 13, we can see that the 6th prime is 13. What is the 10 001st prime nu […]

続きを読む

【Project EulerにRubyで挑戦シリーズ】問6:Sum square difference

今回の問題 Sum square difference The sum of the squares of the first ten natural numbers is, 1**2 + 2**2 + … + 10**2 = 385 The square of the sum of t […]

続きを読む

【Project EulerにRubyで挑戦シリーズ】問5:Smallest multiple

今回の問題 Smallest multiple 2520 is the smallest number that can be divided by each of the numbers from 1 to 10 without any remainder. What is the smalles […]

続きを読む