Result

AC

Duration

1291ms

Code [DL]

use std::io::*;fn main(){let mut b=[0;9];let(_,h)=(stdin().read(&mut b),(b[0]-48)*10+b[1]-48);for y in 0..h{println!("*{}*",if y>0&&y<h-1{" "}else{"*"}.repeat(((b[3]-48)*10+b[4]-50)as usize));}}

stdin

39
19

stdout

*******************
*                 *
*                 *
*                 *
*                 *
*                 *
*                 *
*                 *
*                 *
*                 *
*                 *
*                 *
*                 *
*                 *
*                 *
*                 *
*                 *
*                 *
*                 *
*                 *
*                 *
*                 *
*                 *
*                 *
*                 *
*                 *
*                 *
*                 *
*                 *
*                 *
*                 *
*                 *
*                 *
*                 *
*                 *
*                 *
*                 *
*                 *
*******************

stderr