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

Rubyで友愛数を探す 〜Rubyでオイラープロジェクトを解こう!Problem21

Problem 21 - Project Eulerより Let d(n) be defined as the sum of proper divisors of n (numbers less than n which divide evenly into n). If d(a) = b and d(b) = a, where a != b, then a and b are an amicable pair and each of a and b are calle…