Sort by

recency

|

1745 Discussions

|

  • + 0 comments

    if name == 'main': x = int(input()) y = int(input()) z = int(input()) n = int(input())

    coordinates = [[i, j, k] for i in range(x+1) for j in range(y+1) for k in range(z+1) if sum([i,j,k]) != n]
    
    print(coordinates)
    
  • + 0 comments
    if __name__ == '__main__':
        x = int(input())
        y = int(input())
        z = int(input())
        n = int(input())
    
        lst = []
    
        lst=[[i,j,k] for i in range(x+1) for j in range(y+1) for k in range(z+1) if i+j+k!=n]
    
        print(lst)
    
  • + 0 comments

    from itertools import product

    def get_coordinates(x: int, y: int, z: int, n: int) -> list:

    result = product(range(x+1), range(y+1), range(z+1))
    return [list(v) for v in filter(lambda x: sum(x) != n, result)]
    

    if name == 'main':

    x = int(input())
    y = int(input())
    z = int(input())
    n = int(input())
    
    print(get_coordinates(x, y, z, n))
    
  • + 0 comments

    result = [[i,j,k] for i in range(x+1) for j in range(y+1) for k in range(z+1) if (i+j+k)!=n] print(result)

  • + 0 comments

    result=[ ] for i in range(x+1): for j in range(y+1): for k in range(z+1): if i+j+k!=n result.append([i,j,k]) print(result)