]> gitweb.factorcode.org Git - factor.git/blobdiff - extra/project-euler/022/022.factor
project-euler: Rewrap, update links, add copyrights, tests
[factor.git] / extra / project-euler / 022 / 022.factor
index ff27a5a9ff11a16cea174fa1aa7aa8954f1d93c2..8f17b3a7ace38c07c8cd3a493b063189e74cc910 100644 (file)
@@ -4,20 +4,21 @@ USING: ascii io.encodings.ascii io.files kernel math
 project-euler.common sequences sorting splitting ;
 IN: project-euler.022
 
-! https://projecteuler.net/index.php?section=problems&id=22
+! https://projecteuler.net/problem=22
 
 ! DESCRIPTION
 ! -----------
 
-! Using names.txt (right click and 'Save Link/Target As...'), a 46K text file
-! containing over five-thousand first names, begin by sorting it into
-! alphabetical order. Then working out the alphabetical value for each name,
-! multiply this value by its alphabetical position in the list to obtain a name
-! score.
+! Using names.txt (right click and 'Save Link/Target As...'), a
+! 46K text file containing over five-thousand first names, begin
+! by sorting it into alphabetical order. Then working out the
+! alphabetical value for each name, multiply this value by its
+! alphabetical position in the list to obtain a name score.
 
-! For example, when the list is sorted into alphabetical order, COLIN, which is
-! worth 3 + 15 + 12 + 9 + 14 = 53, is the 938th name in the list. So, COLIN
-! would obtain a score of 938 * 53 = 49714.
+! For example, when the list is sorted into alphabetical order,
+! COLIN, which is worth 3 + 15 + 12 + 9 + 14 = 53, is the 938th
+! name in the list. So, COLIN would obtain a score of 938 * 53 =
+! 49714.
 
 ! What is the total of all the name scores in the file?