TCCC '24 June P1 - Levelling Up

View as PDF

Submit solution

Points: 3
Time limit: 1.0s
Memory limit: 64M

Author:
Problem type

Wayne is playing video games. While playing, they grind N different kinds of enemies. Each enemy drops a_i experience and they defeat b_i of each. How much experience did Wayne get?

Limitations

1 \le N \le 100
1 \le a_i, b_i \le 2000

Sample Input

2
5 4
8 2

Sample Output

36

Sample Explanation

Wayne fought 4 of the 1st enemy, getting 5 + 5 + 5 + 5 = 20 xp.
Then they fought 2 of the 2nd enemy, getting 8 + 8 = 16 xp.
In total, they gained 36 xp.


Comments

There are no comments at the moment.