challenges

my solutions to various "programming challenge" problems
git clone https://wehaveforgeathome.hates.computer/challenges.git
Log | Files | Refs | LICENSE

commit 5b1da6c02805c333006e44fb225ecda7927898b6
parent 72830be8ea7559446661f921bd0f69dc614b5d69
Author: Ryan Wolf <johnwayne@pseudony.ms>
Date:   Wed, 23 Dec 2015 15:36:10 -0500

fixed breaking ruby api change, added running directions

Diffstat:
Mprojecteuler/022/022.rb | 3++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/projecteuler/022/022.rb b/projecteuler/022/022.rb @@ -1,4 +1,5 @@ #!/usr/bin/ruby +# run from same dir as names.txt names = File.open("names.txt").first names.chomp @@ -7,7 +8,7 @@ names = names.gsub(/["\s]/, '').split(",") def score (name, index) s = 0 for i in (0...name.size) - c = name[i] - 64 + c = name[i].ord - 64 s += c end s * (index + 1)