Result

AC

Duration

706ms

Code [DL]

x,k;main(c){for(;~(c=getchar());)putchar(c|=c&4?x=0:++x%51?k|=c&1:!(k=0));}

stdin

                                     T            
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
K                                                 

stdout

                                     T            
                                     !            
                                     !            
                                     !            
                                     !            
                                     !            
                                     !            
K!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!            

stderr

/tmp/code.c:1:1: warning: data definition has no type or storage class
 x,k;main(c){for(;~(c=getchar());)putchar(c|=c&4?x=0:++x%51?k|=c&1:!(k=0));}
 ^
/tmp/code.c:1:1: warning: type defaults to 'int' in declaration of 'x' [-Wimplicit-int]
/tmp/code.c:1:3: warning: type defaults to 'int' in declaration of 'k' [-Wimplicit-int]
 x,k;main(c){for(;~(c=getchar());)putchar(c|=c&4?x=0:++x%51?k|=c&1:!(k=0));}
   ^
/tmp/code.c:1:5: warning: return type defaults to 'int' [-Wimplicit-int]
 x,k;main(c){for(;~(c=getchar());)putchar(c|=c&4?x=0:++x%51?k|=c&1:!(k=0));}
     ^~~~
/tmp/code.c: In function 'main':
/tmp/code.c:1:5: warning: type of 'c' defaults to 'int' [-Wimplicit-int]
/tmp/code.c:1:22: warning: implicit declaration of function 'getchar' [-Wimplicit-function-declaration]
 x,k;main(c){for(;~(c=getchar());)putchar(c|=c&4?x=0:++x%51?k|=c&1:!(k=0));}
                      ^~~~~~~
/tmp/code.c:1:22: note: 'getchar' is defined in header '<stdio.h>'; did you forget to '#include <stdio.h>'?
+#include <stdio.h>
 x,k;main(c){for(;~(c=getchar());)putchar(c|=c&4?x=0:++x%51?k|=c&1:!(k=0));}
                      ^~~~~~~
/tmp/code.c:1:34: warning: implicit declaration of function 'putchar' [-Wimplicit-function-declaration]
 x,k;main(c){for(;~(c=getchar());)putchar(c|=c&4?x=0:++x%51?k|=c&1:!(k=0));}
                                  ^~~~~~~

strace