~/algor $ cat problems/matritsa-songa-kopaytirish
Multiply a matrix by a number
Easy
1000 ms
64 MB
31%
A matrix of size $n \times m$ and an integer $k$ are given. Multiply every element of the matrix by $k$ and print the resulting matrix.
Input
The first line contains three integers $n$, $m$ and $k$.
Each of the next $n$ lines contains $m$ integers — the matrix.
Output
$n$ lines with $m$ integers each.
Note
$1 \le n, m \le 100$
$-1000 \le k, a_{i,j} \le 1000$
Examples
Input #1
2 3 -2 1 0 4 -3 5 2
Output #1
-2 0 -8 6 -10 -4
Input #2
1 1 0 7
Output #2
0