Result

WA

Duration

7072ms

Code [DL]

open System
let f=Console.ReadLine
let w (x:string)=Console.WriteLine x
let T=f()
let t=T.IndexOf 'T'
[<EntryPoint>]
let main v =
    w(T)
    let mutable i=f()
    while i.IndexOf 'K'<0 do
        w(T)
        Console.WriteLine (i.IndexOf 'K')
        i<-f()
    let k=i.IndexOf 'K'
    w (i.[..k]+String.replicate (t-k) "K")
    0

stdin

                                       T          
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                K                                 

stdout

                                       T          
                                       T          
-1
                                       T          
-1
                                       T          
-1
                                       T          
-1
                                       T          
-1
                                       T          
-1
                                       T          
-1
                                       T          
-1
                                       T          
-1
                                       T          
-1
                                       T          
-1
                                       T          
-1
                                       T          
-1
                                       T          
-1
                                       T          
-1
                                       T          
-1
                                       T          
-1
                                       T          
-1
                                       T          
-1
                                       T          
-1
                                       T          
-1
                                       T          
-1
                                       T          
-1
                KKKKKKKKKKKKKKKKKKKKKKKK

stderr

The template "Console Application" was created successfully.

Processing post-creation actions...
Running 'dotnet restore' on /tmp/Proj/Proj.fsproj...
  Restoring packages for /tmp/Proj/Proj.fsproj...
  Generating MSBuild file /tmp/Proj/obj/Proj.fsproj.nuget.g.props.
  Generating MSBuild file /tmp/Proj/obj/Proj.fsproj.nuget.g.targets.
  Restore completed in 203.85 ms for /tmp/Proj/Proj.fsproj.

Restore succeeded.

strace