へたっぴpythonista

ド素人pythonistaとして、日々の学習成果や気づいたことについて書きます。

2013-08-28から1日間の記事一覧

Project Euler56 をpythonで解く

問題 A googol (10^100) is a massive number: one followed by one-hundred zeros; 100^100 is almost unimaginably large: one followed by two-hundred zeros. Despite their size, the sum of the digits in each number is only 1.Considering natural …

Project Euler 55をpythonで解く

問題 If we take 47, reverse and add, 47 + 74 = 121, which is palindromic.Not all numbers produce palindromes so quickly. For example,349 + 943 = 1292, 1292 + 2921 = 4213 4213 + 3124 = 7337That is, 349 took three iterations to arrive at a p…