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 1≤n≤1001\leq n\leq 100, the number of columns 1≤m≤1001\leq m\leq 100, and the number of dimensions 1≤d≤1001\leq d\leq 100 of the Matrix. This is followed by d⋅nd\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