Gửi bài giải

Điểm: 1,00 (OI)
Giới hạn thời gian: 1.0s
Giới hạn bộ nhớ: 256M
Input: stdin
Output: stdout

Nguồn bài:
Hà Minh Ngọc
Dạng bài
Ngôn ngữ cho phép
C, C++, Java, Kotlin, Pascal, PyPy, Python, Scratch

ABC Company calculates the salary of the seasonal staff by hour. Note that working hours over ~8~ hours(Overtime) is ~1.5~ times the hourly wage (Wage). Given the working time of ~5~ days a week and hourly wages. Calculate the salary of employees and the average office hour salary and the average overtime pay.

Input

  • The first line is the number of employees, no more than ~1000~.
  • The next ~n~ lines, consisting of ~5~ real numbers, are ~5~-day working hours and hourly wages

Output

  • The first ~n~ lines are the wages of ~n~ people
  • The next line is the average salary per office hour
  • The bottom line is the average salary per hour overtime.
  • Numbers are rounded to the ~2^{nd}~ decimal place.

Example Input

3
1 2 3 10 2 5
11.0 0 0 0 0 6.2
1 1 1 1 1 10

Example Output

95
77.5
50
6.19
8.58

Bình luận

Hãy đọc nội quy trước khi bình luận.


Không có bình luận tại thời điểm này.