Result

WA

Duration

1254ms

Code [DL]

use std::io::*;
fn main(){
  let mut b=String::new();
  let mut c=String::new();
  stdin().read_line(&mut b);
  while !c.contains('K') {
    c=String::new();
    stdin().read_line(&mut c);
    print!("{}",b);
  }
  let t=c.trim_end();
  println!("{}{}",t,"=".repeat(b.trim_end().len()-c.len()));
}

stdin

                         T                        
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                                                  
                K                                 

stdout

                         T                        
                         T                        
                         T                        
                         T                        
                         T                        
                         T                        
                         T                        
                         T                        
                         T                        
                         T                        
                         T                        
                         T                        
                         T                        
                         T                        
                         T                        
                         T                        
                         T                        
                         T                        
                         T                        
                         T                        
                         T                        
                         T                        
                         T                        
                         T                        
                         T                        
                         T                        
                         T                        
                         T                        
                         T                        
                         T                        
                         T                        
                         T                        
                         T                        
                         T                        
                         T                        
                         T                        
                         T                        
                         T                        
                         T                        
                         T                        
                         T                        
                         T                        
                         T                        
                         T                        
                         T                        
                         T                        
                         T                        

stderr

warning: unused `std::result::Result` that must be used
 --> /tmp/code.rs:5:3
  |
5 |   stdin().read_line(&mut b);
  |   ^^^^^^^^^^^^^^^^^^^^^^^^^^
  |
  = note: #[warn(unused_must_use)] on by default
  = note: this `Result` may be an `Err` variant, which should be handled

warning: unused `std::result::Result` that must be used
 --> /tmp/code.rs:8:5
  |
8 |     stdin().read_line(&mut c);
  |     ^^^^^^^^^^^^^^^^^^^^^^^^^^
  |
  = note: this `Result` may be an `Err` variant, which should be handled

thread 'main' panicked at 'attempt to subtract with overflow', /tmp/code.rs:12:32
note: Run with `RUST_BACKTRACE=1` environment variable to display a backtrace.

strace