package main import . "fmt" func main() { var n,m int var op string Scan(&n,&m,&op) bs:=make([]int,m,m) for i:=range bs { Scan(&bs[i]) } for ;n>0;n-- { var a int Scan(&a) for i,b:=range bs { if i>0 { Print(" ") } if op=="+" { Print(a+b) } else { Print(a*b) } } Println() } }