def is_triplet(t):
    a, b, c = t
    if not a < b < c:
        return False
    return a ** 2 + b ** 2 == c ** 2 and a + b + c == 1000


from itertools import combinations
a = combinations(range(200, 500), 3)
a = filter(is_triplet, a)
a = next(a)
print(a, sum(a))

c0da2550480bdc3e4f059623e77fd261465baec1
def is_triplet(t):
    a, b, c = t
    if not a < b < c:
        return False
    return a ** 2 + b ** 2 == c ** 2 and a + b + c == 1000


<mask token>

def is_triplet(t):
    a, b, c = t
    if not a < b < c:
        return False
    return a ** 2 + b ** 2 == c ** 2 and a + b + c == 1000


<mask token>
print(a, sum(a))

def is_triplet(t):
    a, b, c = t
    if not a < b < c:
        return False
    return a ** 2 + b ** 2 == c ** 2 and a + b + c == 1000


<mask token>
a = combinations(range(200, 500), 3)
a = filter(is_triplet, a)
a = next(a)
print(a, sum(a))

def is_triplet(t):
    a, b, c = t
    if not a < b < c:
        return False
    return a ** 2 + b ** 2 == c ** 2 and a + b + c == 1000


from itertools import combinations
a = combinations(range(200, 500), 3)
a = filter(is_triplet, a)
a = next(a)
print(a, sum(a))
