Taking input Python

take custom input and run…

thank you so much !!

T=int(input())
for _ in range(T):
    N=int(input())
    d={}
    maxscore=0
    for i in range(N):
        p,s=map(int,input().split())
        if p in d.keys():
            d[p]=max(d[p],s)
        else:
            d[p]=s
        for j,k in d.items():
            if j<1 or j>8:
                pass
            else:
                maxscore+=k
    print(maxscore)

Traceback (most recent call last):
File “./prog.py”, line 23, in
EOFError: EOF when reading a line

help me to solve this error

Are you trying to Run without providing Custom Input?

for this, you can set the recursion limit bu following line :
sys.setrecursionlimit(10**6)

You need to provide an input type…
Like:
x = int(input())

thanks for the solution it worked like a charm
will it work for all the programs?