Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def f(a,b,c,n=0,a1=0,b1=0,c1=0):
- if a*a1+b*b1+c*c1==1000:
- n+=1
- c1+=1
- if c1 == 1000//c:
- b1 += 1
- c1 = 0
- if b1 == 1000//b:
- b1 = 0
- a1 += 1
- if a1== 1000//a:
- return n
- return f(a,b,c,a1=a1,b1=b1,n = n)
Add Comment
Please, Sign In to add comment