#K656. Find Peak Activity Hour
Find Peak Activity Hour
Find Peak Activity Hour
You are given a list of 24 integers. Each integer represents the number of posts made during a specific hour of the day (from hour 0 to hour 23). Your task is to determine the hour when the user was most active. If there are multiple hours with the same maximum number of posts, return the earliest hour.
In mathematical terms, let \(p_i\) be the number of posts in hour \(i\) for \(0 \leq i \leq 23\). You need to find the smallest index \(i\) such that \(p_i = \max\{p_0,p_1,\dots,p_{23}\}\).
inputFormat
The input consists of a single line containing 24 space-separated integers. Each integer \(p_i\) (where \(0 \leq i \leq 23\)) indicates the number of posts during hour \(i\).
outputFormat
Output a single integer representing the hour (0-indexed) when the user was most active. In case of a tie, output the earliest hour among them.
## sample3 5 0 6 2 8 4 1 7 6 8 9 12 15 7 4 3 6 2 1 4 5 2 11
13