+ 1
Need a program for this condition!
Input 3 1 2 3 Output 53 Explanation Possible ways of buying sweets are- a) 1 b) 1 2 c) 2 d) 1 2 3 e) 2 3 f) 3 cost of each of these is following- a) 1*1= 1 b) 1*2+2*2= 6 c) 2*2= 4 d) 1*3+2*3+3*3= 18 e) 2*3+3*3= 15 f) 3*3= 9
2 Antworten
+ 2
https://code.sololearn.com/W7PNm8vZ0M7P/?ref=app
Something like that?
+ 1
https://code.sololearn.com/W7oI2e0X0Dr8/?ref=app
Or maybe with more parameters and not all because I dont know exactly logical about the series