Average X81397


Statement
 

pdf   zip

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.

Public test cases
  • Input

    2 2 2
    1 3
    2 5
    4 7
    1 1
    

    Output

    3 5
    2 3
    
  • Input

    2 3 3
    6 1 3
    7 3 3
    1 3 2
    9 4 3
    6 5 8
    8 2 5
    

    Output

    4 3 4
    8 3 4
    
  • Input

    1 2 5
    4 5
    2 3
    9 7
    6 6
    8 1
    

    Output

    6 4
    
  • Information
    Author
    Anders Jonsson
    Language
    English
    Official solutions
    Unknown.
    User solutions
    C++