2009-01-18から1日間の記事一覧

Rubyでサブプライム問題解決! 〜Rubyでオイラープロジェクトを解こう!Problem10

Problem 10 - Project Eulerより 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 + 7 = 17 である。 200万未満の素数すべての和を求めよ。 Problem3で既に素数を…

Rubyで縦横斜めの積を求める 〜Rubyでオイラープロジェクトを解こう!Problem11

Problem 11 - Project Eulerより 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 05 07 78 52 12 50 77 91 08 49 49 99 40 17 81 18 57 60 87 17 40 98 43 69 48 04 56 62 00 81 4…