nbDig2 :: Int -> Int -> Int
nbDig2 n d = sum [length $ filter (==c) $ show (x*x) | x <- [0..n]]
  where c = intToDigit d
nbDig2 :: Int -> Int -> Int
nbDig2 n d = sum [length $ filter (==c) $ show (x*x) | x <- [0..n]]
  where c = intToDigit d
nbDig2 n d = sum [length $ filter (==c) $ show (x*x) | x <- [0..n]]
  where c = intToDigit d