Result

AC

Duration

728ms

Code [DL]

let rec f?(c=input_char stdin)x=print_char(if x<1 then 'x'else c);f(match c with 'T'->1|'K'->x-50|_->(x+1)mod 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                  
    Kxxxxxxxxxxxxxxxxxxxxxxxxxxx                  

stderr

Exception: End_of_file.

strace

11    execve("/bin/sh", ["/bin/sh", "/root/script", "/volume/CODE"], 0x7fff69d3dd30 /* 7 vars */) = 0
12    execve("/bin/cat", ["cat", "-"], 0x559a7094cd30 /* 7 vars */) = 0
12    +++ exited with 0 +++
11    --- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=12, si_uid=0, si_status=0, si_utime=0, si_stime=0} ---
13    execve("/usr/bin/ocaml", ["/usr/bin/ocaml", "/volume/CODE"], 0x559a7094cd40 /* 7 vars */) = 0
13    +++ exited with 2 +++
11    --- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=13, si_uid=0, si_status=2, si_utime=2, si_stime=1} ---
11    +++ exited with 2 +++