EOF while reading input

While running the program using custom input it works perfect but it shows runtime error while submission. Any method to resolve the problem ??