is the problem equivalent to: find six distinct integers a,b,c,d,e,f in the range 1 to 49 inclusive such that 49*48*47*46*45*44*(a+b+c+d+e+f)=a*b*c*d*e*f?
Funny thing is I actually thought for a second that was you commenting about something with the orphan challenge. So now the PVC pipe has become intelligent
@mınxomaτ m9 u srs ಠ____________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________________ಠ
def ways_to_make_sum(N,k,m):
"""Number of ways to write N as a sum of k ordered positive integers in the inclusive range 1 to m"""
l=[1]+[0]*k*m
for _ in range(k):
new_l=[sum(l[:i][-m:]) for i in range(1+k*m)]
l=new_l
if len(l)<=N:return 0
return l[N]
f=ways_to_make_sum
print f(150,6,49)
def sum_counts(k,m):
"""List of number of ways to write the index N as a sum of k ordered positive integers in the inclusive range 1 to m"""
l=[1]+[0]*k*m
for _ in range(k):
new_l=[sum(l[:i][-m:]) for i in range(1+k*m)]
l=new_l
return l
l=sum_counts(6,49)
print l
also, it looks like you're calling permutations, which doesn't have repeats
Task:
I know we can all add two numbers the short way, using +. Your task is to create the longest code you can to add two input numbers.
Rules:
All of the code must be on topic (don't fill it with non-addition code to add length)
The count is in characters, but do not count tabs, spaces, or ...
It's simple, make the longest (Actual) word possible that achieves something.
The task can be anything.
No spaces/periods/etc, must be one word. Also, don't use numbers as letters.
To make this easier, you may have randomly capitalized letters - "ChICkeN"
(No, "ChICkeN" can't actually be run)
@AlienG I wouldn't bother undeleting it, personally. It's just going to end up with people browsing esolangs looking for long command words. There's no real task or challenge to it.
I could just post: "Calculate the time it takes to calculate the time it takes..." But not sure if that works... Though the answer is probably one frame.