You are viewing a single comment's thread. Return to all comments →
f# solution
open System let swap str = str |> Seq.chunkBySize 2 |> Seq.map Seq.rev |> Seq.concat |> Seq.map string |> String.concat "" [<EntryPoint>] let main args = let n = Console.ReadLine() |> int [ 1..n ] |> Seq.map (fun _ -> Console.ReadLine()) |> Seq.map swap |> Seq.iter Console.WriteLine 0
Seems like cookies are disabled on this browser, please enable them to open this website
String-o-Permute
You are viewing a single comment's thread. Return to all comments →
f# solution