Result

AC

Duration

7365ms

Code [DL]

let rec f x=let c=stdin.Read()in printf"%c"(if x<2*c/(c+1)then 'x'else char c);f((match c with|84->1|75->x-50|_->x+1)%51)
f 1

stdin

                                T                 
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                           K                      

stdout

                                T                 
                                x                 
                                x                 
                                x                 
                                x                 
                                x                 
                                x                 
                                x                 
                                x                 
                                x                 
                                x                 
                                x                 
                                x                 
                                x                 
                                x                 
                                x                 
                                x                 
                                x                 
                                x                 
                                x                 
                                x                 
                                x                 
                                x                 
                                x                 
                                x                 
                                x                 
                                x                 
                                x                 
                                x                 
                                x                 
                                x                 
                                x                 
                                x                 
                                x                 
                                x                 
                                x                 
                                x                 
                                x                 
                                x                 
                                x                 
                                x                 
                                x                 
                                x                 
                                x                 
                                x                 
                           Kxxxxx                 

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 211 ms for /tmp/Proj/Proj.fsproj.

Restore succeeded.


Unhandled Exception: System.DivideByZeroException: Attempted to divide by zero.
   at Program.f[a](Int32 x) in /tmp/Proj/Program.fs:line 1
   at <StartupCode$Proj>.$Program.main@() in /tmp/Proj/Program.fs:line 2

strace