Result

AC

Duration

1233ms

Code [DL]

begin
character c;
integer i,t,k;
t:=-1;
a:
c:=inchar;
if c='T'then t:=i;
if c='K'then k:=1;
outchar(if t=i or k=1 then'T'else c);
i:=i-i//80*80+1;
if i<=t or k=0 then goto a;
end

stdin

                       T                          
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
        K                                         

stdout

                       T
                       T
                       T
                       T
                       T
                       T
                       T
                       T
                       T
                       T
                       T
                       T
                       T
                       T
        TTTTTTTTTTTTTTTT

stderr

Compiling /tmp/code.sim:
gcc -g -O2 -c code.c
code.c: In function 'main':
code.c:115:136: warning: implicit declaration of function 'exit' [-Wimplicit-function-declaration]
 int main(int __argc, char *__argv[]){__progname= __argv[0];goto __sw;__l0:__rstart(__argc,__argv);goto __start;__l1:__slutt:__rslutt();exit(0);__start:__curent_map=__mapmain;
                                                                                                                                        ^~~~
code.c:115:136: warning: incompatible implicit declaration of built-in function 'exit'
code.c:115:136: note: include '<stdlib.h>' or provide a declaration of 'exit'
code.c:4:1:
+#include <stdlib.h>
 __map __mapmain[3]={"/tmp/code.sim",0L,1L,
code.c:115:136:
 int main(int __argc, char *__argv[]){__progname= __argv[0];goto __sw;__l0:__rstart(__argc,__argv);goto __start;__l1:__slutt:__rslutt();exit(0);__start:__curent_map=__mapmain;
                                                                                                                                        ^~~~
/tmp/code.sim:11:103: warning: implicit declaration of function '__rbe'; did you mean '__rb'? [-Wimplicit-function-declaration]
 if i<=t or k=0 then goto a;
                                                                                                       ^    
                                                                                                       __rb
/tmp/code.sim: In function '__init':
/tmp/code.sim:15:19: warning: implicit declaration of function '__init_FILE'; did you mean '__init'? [-Wimplicit-function-declaration]
/tmp/code.sim: At top level:
/tmp/code.sim:16:1: warning: return type defaults to 'int' [-Wimplicit-int]
/tmp/code.sim:24:1: warning: return type defaults to 'int' [-Wimplicit-int]
gcc -g -O2 -o /tmp/code code.o -L/usr/local/lib -lcim

strace

11    execve("/bin/sh", ["/bin/sh", "/root/script", "/volume/CODE"], 0x7ffce12b2460 /* 7 vars */) = 0
12    execve("/usr/bin/realpath", ["realpath", "/volume/CODE"], 0x55dec398fd18 /* 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("/bin/ln", ["ln", "-sf", "/volume/CODE", "/tmp/code.sim"], 0x55dec398fd38 /* 7 vars */) = 0
13    +++ exited with 0 +++
11    --- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=13, si_uid=0, si_status=0, si_utime=0, si_stime=0} ---
14    execve("/usr/local/bin/cim", ["cim", "/tmp/code.sim", "-o", "/tmp/code"], 0x55dec398fd68 /* 7 vars */) = 0
15    execve("/bin/sh", ["sh", "-c", "chmod +x ./code.shl"], 0x7ffc44b10890 /* 7 vars */) = 0
15    execve("/bin/chmod", ["chmod", "+x", "./code.shl"], 0x558689986cf8 /* 7 vars */) = 0
15    +++ exited with 0 +++
14    --- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=15, si_uid=0, si_status=0, si_utime=0, si_stime=0} ---
14    execve("./code.shl", ["./code.shl", "-o", "/tmp/code", "/tmp/code.sim"], 0x7ffc44b10890 /* 7 vars */) = 0
16    execve("/usr/bin/gcc", ["gcc", "-g", "-O2", "-c", "code.c"], 0x559ab1b31990 /* 7 vars */) = 0
17    execve("/usr/libexec/gcc/x86_64-alpine-linux-musl/8.3.0/cc1", ["/usr/libexec/gcc/x86_64-alpine-l"..., "-quiet", "code.c", "-quiet", "-dumpbase", "code.c", "-mtune=generic", "-march=x86-64", "-auxbase", "code", "-g", "-O2", "-o", "/tmp/ccLKBiJe.s"], 0x22e3340 /* 9 vars */) = 0
17    +++ exited with 0 +++
16    --- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=17, si_uid=0, si_status=0, si_utime=5, si_stime=1} ---
18    execve("/usr/lib/gcc/x86_64-alpine-linux-musl/8.3.0/../../../../x86_64-alpine-linux-musl/bin/as", ["/usr/lib/gcc/x86_64-alpine-linux"..., "--64", "-o", "code.o", "/tmp/ccLKBiJe.s"], 0x22e3340 /* 9 vars */) = 0
18    +++ exited with 0 +++
16    --- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=18, si_uid=0, si_status=0, si_utime=0, si_stime=0} ---
16    +++ exited with 0 +++
14    --- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=16, si_uid=0, si_status=0, si_utime=0, si_stime=0} ---
19    execve("/bin/rm", ["rm", "-f", "code.c"], 0x559ab1b31970 /* 7 vars */) = 0
19    +++ exited with 0 +++
14    --- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=19, si_uid=0, si_status=0, si_utime=0, si_stime=0} ---
20    execve("/usr/bin/gcc", ["gcc", "-g", "-O2", "-o", "/tmp/code", "code.o", "-L/usr/local/lib", "-lcim", "-lm"], 0x559ab1b313d0 /* 7 vars */) = 0
21    execve("/usr/libexec/gcc/x86_64-alpine-linux-musl/8.3.0/collect2", ["/usr/libexec/gcc/x86_64-alpine-l"..., "-plugin", "/usr/libexec/gcc/x86_64-alpine-l"..., "-plugin-opt=/usr/libexec/gcc/x86"..., "-plugin-opt=-fresolution=/tmp/cc"..., "-plugin-opt=-pass-through=-lgcc", "-plugin-opt=-pass-through=-lgcc_"..., "-plugin-opt=-pass-through=-lc", "-plugin-opt=-pass-through=-lgcc", "-plugin-opt=-pass-through=-lgcc_"..., "--eh-frame-hdr", "--hash-style=gnu", "-m", "elf_x86_64", "--as-needed", "-dynamic-linker", "/lib/ld-musl-x86_64.so.1", "-pie", "-z", "relro", "-z", "now", "-o", "/tmp/code", "/usr/lib/gcc/x86_64-alpine-linux"..., "/usr/lib/gcc/x86_64-alpine-linux"..., "/usr/lib/gcc/x86_64-alpine-linux"..., "-L/usr/local/lib", "-L/usr/lib/gcc/x86_64-alpine-lin"..., "-L/usr/lib/gcc/x86_64-alpine-lin"..., "-L/usr/lib/gcc/x86_64-alpine-lin"..., "-L/lib/../lib", ...], 0x1ac07a0 /* 12 vars */) = 0
22    execve("/usr/lib/gcc/x86_64-alpine-linux-musl/8.3.0/../../../../x86_64-alpine-linux-musl/bin/ld", ["/usr/lib/gcc/x86_64-alpine-linux"..., "-plugin", "/usr/libexec/gcc/x86_64-alpine-l"..., "-plugin-opt=/usr/libexec/gcc/x86"..., "-plugin-opt=-fresolution=/tmp/cc"..., "-plugin-opt=-pass-through=-lgcc", "-plugin-opt=-pass-through=-lgcc_"..., "-plugin-opt=-pass-through=-lc", "-plugin-opt=-pass-through=-lgcc", "-plugin-opt=-pass-through=-lgcc_"..., "--eh-frame-hdr", "--hash-style=gnu", "-m", "elf_x86_64", "--as-needed", "-dynamic-linker", "/lib/ld-musl-x86_64.so.1", "-pie", "-z", "relro", "-z", "now", "-o", "/tmp/code", "/usr/lib/gcc/x86_64-alpine-linux"..., "/usr/lib/gcc/x86_64-alpine-linux"..., "/usr/lib/gcc/x86_64-alpine-linux"..., "-L/usr/local/lib", "-L/usr/lib/gcc/x86_64-alpine-lin"..., "-L/usr/lib/gcc/x86_64-alpine-lin"..., "-L/usr/lib/gcc/x86_64-alpine-lin"..., "-L/lib/../lib", ...], 0x7fffeabd6610 /* 12 vars */) = 0
22    +++ exited with 0 +++
21    --- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=22, si_uid=0, si_status=0, si_utime=1, si_stime=2} ---
21    +++ exited with 0 +++
20    --- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=21, si_uid=0, si_status=0, si_utime=0, si_stime=0} ---
20    +++ exited with 0 +++
14    --- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=20, si_uid=0, si_status=0, si_utime=0, si_stime=0} ---
23    execve("/bin/rm", ["rm", "-f", "./code.shl"], 0x559ab1886ce0 /* 7 vars */) = 0
23    +++ exited with 0 +++
14    --- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=23, si_uid=0, si_status=0, si_utime=0, si_stime=0} ---
14    +++ exited with 0 +++
11    --- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=14, si_uid=0, si_status=0, si_utime=0, si_stime=0} ---
24    execve("/bin/cat", ["cat", "-"], 0x55dec398fd48 /* 7 vars */ <unfinished ...>
25    execve("/tmp/code", ["/tmp/code"], 0x55dec398fd60 /* 8 vars */ <unfinished ...>
24    <... execve resumed> )            = 0
25    <... execve resumed> )            = 0
24    +++ exited with 0 +++
11    --- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=24, si_uid=0, si_status=0, si_utime=0, si_stime=0} ---
25    +++ exited with 0 +++
11    --- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=25, si_uid=0, si_status=0, si_utime=0, si_stime=0} ---
26    execve("/bin/rm", ["rm", "/tmp/code.sim", "/tmp/code"], 0x55dec398fcf0 /* 7 vars */) = 0
26    +++ exited with 0 +++
11    --- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=26, si_uid=0, si_status=0, si_utime=0, si_stime=0} ---
11    +++ exited with 0 +++