Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def wyznaczLiczbeUporzadkowanychK(k,n):
- if k==1:
- return 1
- else : suma = 0
- for l in range(k−1,n):
- suma +=wyznaczLiczbeUporzadkowanychK(k−1,l )
- return suma;
- print ( ’Liczba uporzadkowanych czworek spelniajacych rownanie x1+x2+x3+x4=51: ’)
- print (wyznaczLiczbeUporzadkowanychK(4 ,51))
- print ( ’ Nacisnij ENTER by zamknac program ’)
- input();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement