#K56397. Calculate Rewards

    ID: 30189 Type: Default 1000ms 256MiB

Calculate Rewards

Calculate Rewards

You are given the durations (in minutes) for three types of workouts: jogging, cycling, and swimming performed over several days. The points awarded for each minute are as follows:

  • Jogging: 10 points/minute
  • Cycling: 5 points/minute
  • Swimming: 15 points/minute

The total points are computed as:

$$\text{total\_points} = 10\times\sum_{i}\text{jogging}_{i} + 5\times\sum_{j}\text{cycling}_{j} + 15\times\sum_{k}\text{swimming}_{k}$$

The number of rewards is then the floor of the total points divided by 100, i.e.,

$$\text{rewards} = \left\lfloor\frac{\text{total\_points}}{100}\right\rfloor$$

Your task is to write a program that reads the workout durations from the standard input and outputs the number of rewards a member can redeem.

inputFormat

The input is provided via standard input (stdin) and consists of four lines:

  1. The first line contains three non-negative integers n m p separated by spaces. Here, n is the number of jogging records, m is the number of cycling records, and p is the number of swimming records.
  2. The second line contains n integers representing the jogging durations in minutes. If n is 0, this line will be empty.
  3. The third line contains m integers representing the cycling durations in minutes. If m is 0, this line will be empty.
  4. The fourth line contains p integers representing the swimming durations in minutes. If p is 0, this line will be empty.

All integers are separated by spaces.

outputFormat

The program should output a single integer to standard output (stdout) representing the number of rewards a member can redeem.

## sample
3 2 2
30 45 20
60 30
25 40
23