Skip to content

Instantly share code, notes, and snippets.

@amirsinaa
Last active March 16, 2024 05:59
Show Gist options
  • Save amirsinaa/28b490d85504f4e32ceb77870b5d5fb4 to your computer and use it in GitHub Desktop.
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
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