+ 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

20th Sep 2017, 5:32 AM
Sripragathiswar
Sripragathiswar - avatar
2 Antworten
21st Sep 2017, 12:05 AM
Daniel
Daniel - avatar
+ 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
21st Sep 2017, 12:26 AM
Daniel
Daniel - avatar