Getting output two times by my code


In my this code I am getting output two times. Why is it so? How can I correct that??

Hello @J19APPPP0007,

This is happening because of two 1s in the input string. so, it is printing the combination for both 1s.
Try to remove these duplicate values.