Олимпиадный тренинг

Задача 6026. Processing a row in a matrix - 2


Given a two-dimensional array A[N][M] ( 2<=N<=20; M 2<=M<=20).
In the first line, enter the number of rows separated by a space - a number from 0 to N-1, and the number of columns - a number from 0 to M-1.
The second line contains the number  k
Next comes the input of array elements line by line
Determine the arithmetic mean of the elements of the k-th row of the array.

Examples
# Input Output
1 2 2
1
5 5
1 2
1.500000
2 2 3
0
1 5 2
3 4 0
2.666666