Humble numbers: Difference between revisions
Content added Content deleted
(→{{header|Haskell}}: Simpler digit count (inlined)) |
|||
Line 678: | Line 678: | ||
mapM_ (putStrLn . concat) $ |
mapM_ (putStrLn . concat) $ |
||
chunksOf 10 $ (justifyRight 4 ' ' . show) <$> take 50 humbles |
chunksOf 10 $ (justifyRight 4 ' ' . show) <$> take 50 humbles |
||
putStrLn "\nCount of humble numbers for each digit length 1- |
putStrLn "\nCount of humble numbers for each digit length 1-25:" |
||
mapM_ print $ |
mapM_ print $ |
||
take 25 $ (head &&& length) <$> group ((length . show) <$> humbles) |
take 25 $ (head &&& length) <$> group ((length . show) <$> humbles) |
||
Line 700: | Line 700: | ||
81 84 90 96 98 100 105 108 112 120 |
81 84 90 96 98 100 105 108 112 120 |
||
Count of humble numbers for each digit length 1- |
Count of humble numbers for each digit length 1-25: |
||
(1,9) |
(1,9) |
||
(2,36) |
(2,36) |