-->
当前位置:首页 > 题库

PROGRAMMING:Water saving activities

Luz5年前 (2021-05-10)题库439
Xiao Ming launched a water-saving activity for primary school students. Inspired by him, everyone took action one after another and distributed the water-saving achievements to Xiao Ming one after another.
Xiaoming has received n water-saving transcripts from all over the country, each of which is marked with the number of days of saving water di and Li. Now Xiao Ming has a headache. How much water has been saved in this activity? Please do the calculation for him
###Input format:
The first line is an integer n, which indicates the number of water-saving transcripts Xiao Ming received.
Next, N lines, two integers Di and Li in each line, which represent the number of water-saving days and daily water-saving quantity of the ith child.
###Output format:
Output the total number of n children.
###Input example:
```in
three
3 4
2 1
6 3
```
###Output example:
```out
thirty-two
```
[example explanation]
The total water saving is 3 * 4 + 2 * 1 + 6 * 3 = 32
[data range]
30% data, n < = 3, 1 < = Di < = 100, 1 < = Li < = 100
70% of the data, n < = 1000, 1 < = Di < = 100, 1 < = Li < = 100
100% data, n < = 1000000, 1 < = Di < = 100, 1 < = Li < = 100







answer:If there is no answer, please comment