#K10356. Highest Scorer

    ID: 23228 Type: Default 1000ms 256MiB

Highest Scorer

Highest Scorer

You are given a total number of game scores n, the number of players k, and a sequence of scores collected in the order of play. The games are evenly distributed among players, i.e., each player plays exactly \( \frac{n}{k} \) games. Your task is to determine the player ID with the highest total score. If there is a tie, output the player with the smallest ID.

Note: It is guaranteed that \( n \) is divisible by \( k \).

inputFormat

The input is given via standard input and consists of two lines. The first line contains two integers \( n \) and \( k \) separated by a space, where \( n \) is the total number of scores and \( k \) is the number of players. The second line contains \( n \) space-separated integers representing the scores in the order of play.

outputFormat

Output a single integer representing the ID (1-indexed) of the player with the highest total score.

## sample
6 3
10 20 30 15 25 35
3