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

PROGRAMMING:How many bananas are there

Luz5年前 (2021-05-10)题库395
There used to be such a puzzle game. There were n monkeys and a bunch of bananas on the beach. At night, a monkey got up secretly and divided the bananas into N parts. He took one more and threw it into the sea. Then he went to sleep. All the monkeys in the back did the same operation. He divided the bananas into N parts, threw one more and took one. How many bananas does it take for all the monkeys to complete the operation( Given an integer m, the number of monkeys, the topic requires the output of the initial number of bananas. The problem is guaranteed to be solved.
###Input format:
In the first line, enter n, followed by N numbers M.
###Output format:
All the output is completed in one line. There should be no extra space at the end of the line and no carriage return at the end
###Input example:
2 in the first line means there are two m inputs. The second line and the third line are the input data
```
two
two
three
```
###Output example:
```out
3 25
```






answer:If there is no answer, please comment