We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
Project Euler #240: Top Dice
Project Euler #240: Top Dice
Sort by
recency
|
15 Discussions
|
Please Login in order to post a comment
My program is giving correct output but the run time gets exceeded, please help in optimizing the code :)
from itertools import product
n1, n2, n3, n4 = map(int,input().split())
l=[]
c=0
for i in range (n2):
for i in product(l, repeat= n1):
print (c)
Is it guranteed to be resolved in slow Python?
See code below
As a general question - is it guaranteed that this can be solved using Python without timing out?
My code working good in VSCODE but it is showing runtime error in the hacker rank editor. The answer for 'test case 0' is same i am getting by my code.
Do we need to do all the import OS, file .write ....., and all ?
I don't understand. The example is working fine, but all of the other tests fails when I submit. What am I missing?