You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
main = interact (formatOutput . solve . parseInput)
-- helpers for parsing
splitOn' :: Char -> String -> NonEmpty String
splitOn' sep s = case s of { [] -> "" :| []; (part : remainder) -> if part == sep then "" <| splitOn' sep remainder else let head :| tail = splitOn' sep remainder in (part : head) :| tail}
splitOn :: Char -> String -> [String]
splitOn sep s = NE.toList (splitOn' sep s)
-- Define input and output here
type Input = Int
type Output = String
formatOutput :: Output -> String
formatOutput solution = solution ++ "\n"
parseInput :: String -> Input
parseInput rawInput = read $ head $ lines rawInput
solve :: Input -> Output
solve x = if x `mod` 10 == 0 then "Jebb" else "Neibb"