#CCBCHBAHAI0000093. Tháng mưa nhiều nhất và ít nhất
Tháng mưa nhiều nhất và ít nhất
Wettest and Driest Months
Source: Phước Hưng OJ
Version: Phuoc Hung OJ Extended
Problem
Given nonnegative integer rainfall values , compute
Let and be the maximum and minimum values. On ties, choose the smallest month number. Print total, average to 2 decimals, and the earliest wettest/driest month with its rainfall.
Input
One line contains exactly 12 integer rainfall values.
Output
Line 1: . Line 2: with 2 decimals. Line 3: and . Line 4: and .
Subtask
Subtask 1 (20 points): Dãy lượng mưa tăng nghiêm ngặt: , .
Subtask 2 (30 points): Giá trị cực đại và cực tiểu đều xuất hiện đúng một lần, .
Subtask 3 (50 points): , cho phép mọi trường hợp hòa.
Example
Input
10 20 35 40 55 80 120 110 75 50 25 10
Output
630
52.50
7 120
1 10
Explanation
The result follows directly from the mathematical definition above.