2009-01-01から1ヶ月間の記事一覧

Project Euler: Problem 18

By starting at the top of the triangle below and moving to adjacent numbers on the row below, the maximum total from top to bottom is 23. 3 7 5 2 4 6 8 5 9 3That is, 3 + 7 + 4 + 9 = 23.Find the maximum total from top to bottom of the trian…

dumb

log

あたまがはたらいてるきがしない。マンガばっか読んでるのもアレなので、気分転換に Project Euler。

Project Euler: Problem 17

If the numbers 1 to 5 are written out in words: one, two, three, four, five, then there are 3 + 3 + 5 + 4 + 4 = 19 letters used in total.If all the numbers from 1 to 1000 (one thousand) inclusive were written out in words, how many letters…

Project Euler: Problem 16

すぐ解ける問題から飛ばし飛ばしに解いてしまうのはあまり良くないかな…。 2^(15) = 32768 and the sum of its digits is 3 + 2 + 7 + 6 + 8 = 26.What is the sum of the digits of the number 2^(1000)? http://projecteuler.net/index.php?section=proble…

Project Euler: Problem 13

Work out the first ten digits of the sum of the following one-hundred 50-digit numbers.37107287533902102798797998220837590246510135740250 46376937677490009712648124896970078050417018260538 74324986199524741059474233309513058123726617309629…

Project Euler: Problem 12 #1

The sequence of triangle numbers is generated by adding the natural numbers. So the 7^(th) triangle number would be 1 + 2 + 3 + 4 + 5 + 6 + 7 = 28. The first ten terms would be:1, 3, 6, 10, 15, 21, 28, 36, 45, 55, ...Let us list the factor…