2008-12-26から1日間の記事一覧

Project Euler: Problem 4

明日から冬休みらしいんだけど、いまいち実感が湧かない。気合いを入れるために Project Euler やってみたけど、いまいちきれいに書けた気がしない。 A palindromic number reads the same both ways. The largest palindrome made from the product of two …

Project Euler: Problem 6

The sum of the squares of the first ten natural numbers is, 1^(2) + 2^(2) + ... + 10^(2) = 385The square of the sum of the first ten natural numbers is, (1 + 2 + ... + 10)^(2) = 55^(2) = 3025Hence the difference between the sum of the squa…

Project Euler: Problem 5

2520 is the smallest number that can be divided by each of the numbers from 1 to 10 without any remainder.What is the smallest number that is evenly divisible by all of the numbers from 1 to 20? http://projecteuler.net/index.php?section=pr…