## abrolrahul9

BAN USER- 0 Answers
**please help me in solving this!!**Given an integer N, find the Nth number in the fibonacci series. Consider 0 and 1 to be the seed values. In a fibonacci series, each number ( Fibonacci number ) is the sum of the two preceding numbers. The series with 0 and 1 as seed values will go like- 0, 1, 1, 2, 3, 5… .

- abrolrahul9 March 23, 2020

Input

The first line contains an integer T, depicting total number of test cases. Then following T lines contains an integer N.

Constraints:

1 ≤ T ≤ 50

1 ≤ N ≤ 50

Output

Space separated Nth fibonacci number for each N given in the input| Flag | PURGE - 0 Answers
**Solve this problem**You are asked q queries each of which can be of type 1 or type 2 Type 1 : Report the area of square of side S. Type 2 : Report the area of rectangle of sides L and R.

- abrolrahul9 March 23, 2020

Input

The first line of the input contains single integer Q.

Next Q line contains the queries.

Each query first contains type of query

if query is of type one you are given a single integer S

if query is of type two you are given two integers L and R

Constraints

1 <= Q <= 25

1 <= T <= 2

1 <= S,L,R <= 1000

Output

Output Q line each containing answer to the asked query| Flag | PURGE

**CareerCup**is the world's biggest and best source for software engineering interview preparation. See all our resources.

Open Chat in New Window