Challenge Information

Title : No Continuous 1's
Difficulty : Medium
Solutions : 11
Maximum Score : 100
Completed by You: No
Description :

There is a positive integer n given. You have to find all distinct binary strings of length n in which there are no consecutive 1's.

Write a function solve that have the following parameter(s):
1.) n = an integer

Example
Input:
n = 4
Output:
8

Explanation
There are 8 strings which contains no consecutive 1's i.e. 0000, 0001, 0100, 0010, 1010, 0101, 1000 and 1001.

Example
Input:
n = 5
Output:
13

Explanation
There are 13 strings which contains no consecutive 1's i.e. 00000, 00001, 00010, 00100, 00101, 01000, 01001, 01010, 10000, 10001, 10010, 10100, 10101.

Constraints

Judocode