Project Euler #9 In Python

Published: 01 April 2021
on channel: Dubious Code
96
0

Python solution to project euler problem 9 from here https://projecteuler.net/problem=9

This was a fun one. We know a 3,4,5 triangle. It turns out there are other perfect squares. So we find every combination of positive a,b,c where a+b+c = 1000 and then check if a^2 + b^2 = c^2.

I ran A and B up to 500 but I suspect it could have been less since C needed to be greater than A or B

All code

Copyright 2021 Google LLC
SPDX-License-Identifier: Apache-2.0
https://www.apache.org/licenses/LICEN...

The Snake image in the thumbnail - by Vecteezy https://www.vecteezy.com/vector-art/4...


On this page of the site you can watch the video online Project Euler #9 In Python with a duration of hours minute second in good quality, which was uploaded by the user Dubious Code 01 April 2021, share the link with friends and acquaintances, this video has already been watched 96 times on youtube and it was liked by 0 viewers. Enjoy your viewing!