Count binary strings

Why am I getting a segmentation fault in this compiler?

hello @sounakume
your code is correct.

just make few changes.
a) use long long for function return type.
b) use long long for dp array datatype.

1 Like