When i run this code on online editors it ran successfully without any error but when i run it on hackerrank it gives segmentation fault error. What to do. help me out. It g