Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Sum of subsets (Python)
import numpy as np k = 3 A = [ 1, 2, 3, 4, 5 ] kk = min( len( A ), k ) + 1 S = np.zeros( kk, dtype=int ); S[0] = 1 for a in A: S[1:kk] = S[1:kk] + a * S[0:kk-1] print( S.sum() - 1 )
run
|
edit
|
history
|
help
0
Dil
PyMetaParam
StringManipulation
Add missing person on list with default age 30
RCM Distributor info.
check this converting week number (int) into week day name (string) [solved]
Reverse linked-list in-place
check the browser existence one by one
line 4
Lakshya