• + 2 comments

    why isnt my code running successfully whereas other compilers give the answers correct

    from itertools import product
    
    
    def solve(x,y,z,n):
        coor = [0, x]
        
        possible_combi = list(product(coor, repeat=3))
        
        newlist = [combo for combo in possible_combi if sum(combo) != n]
        
        for combo in newlist:
            print(combo)
    
    
    if __name__ == '__main__':
        x = int(input())
        y = int(input())
        z = int(input())
        n = int(input())
        solve(x,y,z,n)