Partially correct answer (ZCO15002)

Please help my solution for problem is giving partially correct answer on submission. Please help.
My code:

from itertools import combinations
def sub(q):
    return list(combinations(q,2))
n,k=tuple(int(i) for i in input().split(" "))
l=[int(i) for i in input().split(" ")]
for i in s:
    if abs(i[0]-i[1])>=k:
print (c)

Please either format your code or (better!) link to your submission - the forum software has mangled it and it won’t compile! :slight_smile:

Link to my solution
and it seems I’m getting TLE time limit issue

thanks for your response @ssjgz

1 Like