If you get Segmentation Fault in Python 3, try using Python 2.7


I was stuck in this problem because my solution gets Segmentation Fault.

After I change it to Python 2.7, it was accepted.

The editorial solution gets SF as well, not sure what happened.


Thanks for this. I hope I had seen this before submitting my answer 4 times.


Thank You.

Is this a problem with their python 3 compiler ?