• + 73 comments

    Thats why its python

    for i in range(n):
        if c[i]+d in c and c[i]+2*d in c:
            gc+=1
    print (gc)