You are viewing a single comment's thread. Return to all comments →
Useful remark (especially for Python3 programmers): try to avoid big integer math (> 2 ** 64). Instead of:
for ... : total *= m print(total % 1000000007)
do:
for ... : total = (total * m) % 1000000007 print(total)
This trick dramatically decreases execution time.
Seems like cookies are disabled on this browser, please enable them to open this website
Picking Cards
You are viewing a single comment's thread. Return to all comments →
Useful remark (especially for Python3 programmers): try to avoid big integer math (> 2 ** 64). Instead of:
do:
This trick dramatically decreases execution time.