Last active
March 16, 2024 05:59
-
-
Save amirsinaa/28b490d85504f4e32ceb77870b5d5fb4 to your computer and use it in GitHub Desktop.
Python code that calculates the maximum product of two numbers from two time intervals
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def calculate_dreamcatcher_number(period1, period2): | |
a, b = period1 | |
c, d = period2 | |
max_product = max(a*c, a*d, b*c, b*d) | |
return max_product | |
if __name__ == "__main__": | |
period1 = list(map(int, input().split())) | |
period2 = list(map(int, input().split())) | |
result = calculate_dreamcatcher_number(period1, period2) | |
print(result) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment