Average

Neo is lost within the different dimensions of the Matrix. To find his way he needs to compute the average intensity of all dimensions in the Matrix. Help Neo complete this task.

Input

The input consists of several test cases. Each test case starts with the number of rows 1n1001\leq n\leq 100, the number of columns 1m1001\leq m\leq 100, and the number of dimensions 1d1001\leq d\leq 100 of the Matrix. This is followed by dnd\cdot n rows with mm integers each, corresponding to the intensities of the dd different dimensions.

Output

For each test case, a matrix consisting of the average intensity across all dimensions, rounded to the closest integer.

Problem information

Author: Anders Jonsson

Generation: 2026-01-25T22:36:59.391Z

© Jutge.org, 2006–2026.
https://jutge.org