Https://hack.codingblocks.com/app/practice/2/398/problem

https://hack.codingblocks.com/app/practice/2/398/problem

I don’t know why it’s showing segmentation fault.
please help i am a begginer.