You are viewing a single comment's thread. Return to all comments →
Is it guranteed to be resolved in slow Python?
See code below
string = input() n, d, m, s = tuple(map(int, string.split())) x = [l for l in range(1,d+1)] m = m * (-1) - 1 z = [p for p in itertools.product(x, repeat=n) if sum(sorted(p)[:m:-1]) == s] print(len(z) % (10**9+7))
Seems like cookies are disabled on this browser, please enable them to open this website
Project Euler #240: Top Dice
You are viewing a single comment's thread. Return to all comments →
Is it guranteed to be resolved in slow Python?
See code below