Feb-16-2018, 05:22 PM
Hello!
I just started learning python this week and i'm struggling with this program.
It's a program that gets one input, being a float with 2 decimals called t, and is supposed to give back a, b and c, also floats with 2 decimals.
The conditions are:
a * b * c == t
a + b + c == t
0 <= a <= b <= c
I already have the code and it works! But it's not fast enough. Anyone has ideas to make it faster?
https://hastebin.josephbanks.me/xamohiwenu.py
I just started learning python this week and i'm struggling with this program.
It's a program that gets one input, being a float with 2 decimals called t, and is supposed to give back a, b and c, also floats with 2 decimals.
The conditions are:
a * b * c == t
a + b + c == t
0 <= a <= b <= c
I already have the code and it works! But it's not fast enough. Anyone has ideas to make it faster?
https://hastebin.josephbanks.me/xamohiwenu.py