You are viewing a single comment's thread. Return to all comments →
Here's the other method but without taking any inputs for my convenience:
from itertools import product A = [24, 48, 96] B = [24, 48, 96, 24] PRODUCT = 0 for X in product(A, B): TOTAL = sum(x**2 for x in X) % int(24) PRODUCT = max(TOTAL, PRODUCT) print(TOTAL, PRODUCT) print(PRODUCT)
Seems like cookies are disabled on this browser, please enable them to open this website
Maximize It!
You are viewing a single comment's thread. Return to all comments →
Here's the other method but without taking any inputs for my convenience: