Пример #1
0
def main():
    for Pa in ngonalNums(5):
        for Pb in ngonalNums(5):
            if Pb >= Pa:
                break
            if pentagonal(Pa + Pb) and pentagonal(Pa - Pb):
                return Pa - Pb
Пример #2
0
def main():
	for Pa in ngonalNums(5):
		for Pb in ngonalNums(5):
			if Pb >= Pa:
				break
			if pentagonal(Pa + Pb) and pentagonal(Pa - Pb):
				return Pa - Pb
Пример #3
0
def main(limit):
	return next(n for n in ngonalNums(3) if n > limit and pentagonal(n) and hexagonal(n))
Пример #4
0
def main(limit):
    return next(n for n in ngonalNums(3)
                if n > limit and pentagonal(n) and hexagonal(n))