Why python codes are not running on the system?

any python code boils down to this error on coding blocks website.
Please note it is running fine on my local system.
##Traceback (most recent call last):

File “source”, line 13, in

t = int(input())

EOFError: EOF when reading a line

My code is :

def ncr(n, r):
    ans = 1
    j = 1
    for i in range(n,n-r,-1):
        ans = ans *i
        ans = ans//j
        j+=1
    return ans
def countWays(n, k):
    if n == k:
        return 1
    return ncr(n-1,k-1)
t = int(input())
while t>0:
    n,k = map(int,input().split(" "))
    print(countWays(n,k))
    t-=1

@shivama_700 hey bro,refer to this article for such error:


You will solve it.

I had already searched on google

It does not solve my problem, the solution describes the possible solution, it does not apply here

@shivama_700 bro try your code on ideone or sapphire engine.