Doubt in my program

In this code what is the problem?

Input:
123333345556

Output:
0

Why?

Hey @yashsharma4304
Solution is correct
You are not getting anything for above because you have not entered digit d
Also ur number >given constraint n and will come in long long instead of int

1 Like

If this resolves your query then please mark it as resolved :slight_smile:

No, I have given the input as:
123333345556
3

But now I understand that the problem was in the datatype storage. Thanks a lot. :slightly_smiling_face:

1 Like