#K63447. Highest Average Sales Category

    ID: 31755 Type: Default 1000ms 256MiB

Highest Average Sales Category

Highest Average Sales Category

You are given sales data for a company with b branches, d days, and c product categories. Each branch records its daily sales for each product category. Your task is to determine the product category that achieved the highest average daily sales over all branches. In other words, if the total sales for the i-th category is \(S_i\), then its average daily sales is given by \(\frac{S_i}{b \times d}\). If more than one category has the same maximum average, choose the one with the smallest index. Note that categories are 1-indexed.

inputFormat

The input is given via standard input (stdin) with the following format:

  • The first line contains three integers separated by spaces: b (number of branches), d (number of days) and c (number of product categories).
  • This is followed by b * d lines. Each of these lines contains c integers representing the sales figures for each category on that branch for that day.

outputFormat

Output a single integer via standard output (stdout): the 1-indexed product category with the highest average daily sales.

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