given two 1D arrays . first array A containing the number of candles as integers , the second B array contains cost of the corresponding number of candles i.e Ai number of candles cost Bi and so on.
we are also given an integer K(total money)
we need to print the maximum number of candles we can purchase whose cost does not increase K(total money)
.
all the data types are non negative
integers.
Eg : k=10 A:(2 3 4 5 6 ) B:(4 5 2 10 6) answer is 10(4+6)