Sita asks Gita to find the number of rounds before the game finally ends.
Can you help Sita in verifying Gita's answer?
Example:
n = 5
List : {34 56 20 90 100}
Round 1 : {34 36 20 90 100}
Round 2 : {34 16 20 90 100}
Round 3 : {18 16 20 90 100}
Round 4 : {2 16 20 90 100}
No. of rounds : 4
Input and Output Format:
Input consists of n+1 integers. The first integer corresponds to n, the number of elements in the list. The next n integers correspond to the elements in the list.
Output consists of a single integer that corresponds to the number of rounds before the game finally ends.
Sample Input 1:
5
34
56
20
90
100
Sample Output 1:
4
Sample Input 2:
3
2
3
4
Sample Output 2:
0
Answers
Answered by
0
Answer:
kya pata GooGle pe check karlo?
mark it as brainliest ans..
Similar questions