Result

WA

Duration

2139ms

Code [DL]

$t,$s=$_|%{$_.TrimEnd()}
"$t
"*$s.Count+$s[-1].PadRight($t.Length,75)|echo

stdin

                             T                    
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                       K                          

stdout

stderr

You cannot call a method on a null-valued expression.
At line:1 char:12
+ $t,$s=$_|%{$_.TrimEnd()}
+            ~~~~~~~~~~~~
+ CategoryInfo          : InvalidOperation: (:) [], RuntimeException
+ FullyQualifiedErrorId : InvokeMethodOnNull
 
Cannot index into a null array.
At line:2 char:1
+ "$t
+ ~~~
+ CategoryInfo          : InvalidOperation: (:) [], RuntimeException
+ FullyQualifiedErrorId : NullArray
 

strace

10    execve("/bin/sh", ["/bin/sh", "/root/script", "/volume/CODE"], 0x7ffc9a1e96c0 /* 6 vars */) = 0
12    execve("/usr/bin/pwsh", ["/usr/bin/pwsh", "/volume/CODE"], 0x55e1dc01dc28 /* 6 vars */) = 0
11    execve("/bin/cat", ["cat", "-"], 0x55e1dc01dc10 /* 6 vars */) = 0
11    +++ exited with 0 +++
10    --- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=11, si_uid=0, si_status=0, si_utime=0, si_stime=0} ---
15    +++ exited with 0 +++
16    +++ exited with 0 +++
12    --- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=15, si_uid=0, si_status=0, si_utime=0, si_stime=0} ---
30    +++ exited with 0 +++
27    +++ exited with 0 +++
29    +++ exited with 0 +++
28    +++ exited with 0 +++
26    +++ exited with 0 +++
25    +++ exited with 0 +++
24    +++ exited with 0 +++
23    +++ exited with 0 +++
22    +++ exited with 0 +++
21    +++ exited with 0 +++
20    +++ exited with 0 +++
19    +++ exited with 0 +++
18    +++ exited with 0 +++
17    +++ exited with 0 +++
14    +++ exited with 0 +++
13    +++ exited with 0 +++
12    +++ exited with 0 +++
10    --- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=12, si_uid=0, si_status=0, si_utime=80, si_stime=34} ---
10    +++ exited with 0 +++