You are viewing a single comment's thread. Return to all comments →
while multiplying all the elements in a list and printing the output, how is
for i in list: ans *= i print (int(fmod(ans,1234567)))
and
print (functools.reduce(op.mul, s, 1) % 1234567)
different. As, in one case solution is being accepted while in another it just passes only one testcase.
Seems like cookies are disabled on this browser, please enable them to open this website
Connecting Towns
You are viewing a single comment's thread. Return to all comments →
while multiplying all the elements in a list and printing the output, how is
for i in list: ans *= i print (int(fmod(ans,1234567)))
and
print (functools.reduce(op.mul, s, 1) % 1234567)
different. As, in one case solution is being accepted while in another it just passes only one testcase.