changeset 9464 | 901e363d5837 |
parent 9462 | 4cbc9a8fd559 |
--- a/tools/hashTest.hs Sat Sep 21 22:32:01 2013 +0400 +++ b/tools/hashTest.hs Sat Sep 21 23:54:57 2013 +0400 @@ -44,7 +44,9 @@ didIunderstand' = do a <- liftM lines getContents + print $ length a print . IS.size . IS.fromList . map (testHash . map fromEnum) $ a where - testHash s = let l = length s in + testHash s = let l = length s in ( (s !! (l - 2) * s !! 1) + s !! (l - 1) - s !! 0 + ) `mod` 256