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

PROGRAMMING:Brush questions and teacher Z's hair

Luz5年前 (2021-05-10)题库468
On pintia, every day, teacher Z gives questions and friends brush them. Teacher Z's hair obeys the following rules: < br > 1
1. 60 hairs grow every day< br>
2. For each question, reduce 20 hairs< br>
3. At the end of each day, the cumulative number of questions: < br > was calculated
(1) If all the questions are done, teacher Z will have "no problem anxiety" and reduce 30 hairs< br>
(2) If the problem is less than 50%, teacher Z will produce "students do not have to work anxiety", reduce 70 hair< br>
Now given n consecutive days of the problem, brush the problem, please calculate the change of teacher Z's hair.
###Input format:
In the first line, enter a positive integer ` n '(` n < 20')< br>
Next, enter two non negative integers in the 'n' line, which are the number of questions' Q 'and the number of brush questions's', separated by spaces< br>
Question input ensures that the total number of questions does not exceed 'n * 10', and the daily number of questions will not make the cumulative number of questions exceed the cumulative number of questions.
###Output format:
If "K" root is added to Z, then "+ k" is output; If the number of 'k' roots is reduced, then '- K' is output; If there is no change, output`--`
###Input sample 1:
```in
three
5 3
5 1
5 11
```
###Output sample 1:
```out
-220
```
###Input sample 2:
```in
three
3 2
3 2
3 2
```
###Output sample 2:
```out
--
```







answer:If there is no answer, please comment