You are viewing a single comment's thread. Return to all comments →
Haskell using cycle :)
solve :: String -> String solve xs = unwords [take len $ drop i $ cycle xs | i <- [1..len]] where len = length xs main = do _ <- getLine c <- lines <$> getContents mapM (putStrLn . solve) c
Seems like cookies are disabled on this browser, please enable them to open this website
Rotate String
You are viewing a single comment's thread. Return to all comments →
Haskell using cycle :)