computeA :: Int -> Int
computeA n = go 1 1
  where
    go 0 acc = acc
    go x acc = go ((x * 10 + 1) `rem` n) (acc+1)
computeA :: Int -> Int
computeA n = go 1 1
  where
    go 0 acc = acc
    go x acc = go ((x * 10 + 1) `rem` n) (acc+1)
computeA n = go 1 1
  where
    go 0 acc = acc
    go x acc = go ((x * 10 + 1) `rem` n) (acc+1)