なんじゃくにっき

プログラミングの話題中心。

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

Project Euler 81 Path sum: two ways

Project Eulerをrubyで解くの81番目。 順番に解くのに飽きてきたので適当にやっていきます。 Problem 81Problem 81 - Project Euler Path sum: two ways Find the minimal path sum, in matrix.txt (right click and "Save Link/Target As..."), a 31K text …

とりあえず rubyでProject Euler解く、🔟問目まで解いた。 解説書こうと思ったけど面倒なのでやめ。 まだ簡単なのでダイジョブっしょ。 github.com

久しぶりにProject Eulerでもやろうかと思って最初から。 Rubyでやります。 まずは1問目は余裕ですね。 If we list all the natural numbers below 10 that are multiples of 3 or 5, we get 3, 5, 6 and 9. The sum of these multiples is 23. Find the sum…