-- http://www.codewars.com/kata/54db15b003e88a6a480000b9
module Codewars.Kata.ModSys where

import Data.List

fromNb2Str :: Integer -> [Integer] -> String
fromNb2Str n xs
  | product xs < n               = "Not applicable"
  | product xs /= foldl lcm 1 xs = "Not applicable"
  | otherwise                    = "-" ++ intercalate "--" (map (show . (n`mod`)) xs) ++ "-"