Count Binary Strings

03/07/2021 5 min Temporada 2 Episodio 12

Listen "Count Binary Strings"

Episode Synopsis

1. You are given a number n.
2. You are required to print the number of binary strings of length n with no consecutive 0's.
Input Format
A number n
Output Format
A number representing the number of binary strings of length n with no consecutive 0's.
Constraints
0 < n <= 45
Sample Input
6
Sample Output
21