Getting runtime error (NZEC) on input code on line 1 in Python; why isn't it working?

Here’s the link to the problem: https://www.codechef.com/WICP1901/problems/TWTCLOSE
Here’s my first line of code: n, k = map(int, input().split())
I am getting the error “EOFError: EOF when reading a line”. That’s an error I get when I forget one of the parentheses, but I have all the correct parentheses in that line of code. My code works on ideone and on codechef ide when I run it using the given example input, but I get this runtime error when I submit. What is wrong?

It’s as though codechef doesn’t provide input when I submit for this problem, even though they are providing input for others submitting for the same problem in the same language. I had another problem I did on codechef in December of last year that had the same issue.

I went to this online compiler, which helped me discover where in my code the error was occurring: https://www.tutorialspoint.com/execute_python3_online.php

The error was with these lines of code:
s = input()
x = s[-1]

When I tried printing x, there was an empty space instead of the last letter of the input string as there would be with other versions of Python 3. After changing x to equal s[6], I was able to submit without getting a runtime error.