can somebody tell me what the answere is for ps2 problim 4 ? i want to know what's the number that is supposed to appear.
Using the (6,9,20) test case, it should be 43, if I recall correctly. Anyway, it should match your prior solution.
43 is the answer I got as well.
thanks guys
i feel stupid but ...what's the difference between problim 3 and problim 4 of ps2?
how did you get the solution ?
The problem 3 asks you to implement a program that returns the biggest number that is impossible to buy given packages of size 6, 9, and 20 (hard-coded in your program). Problem 4 asks you to generalize this program, and ask for input for sizes <X> <Y> <Z>, and then find the biggest number that is impossible to buy. I got the solution using my implementation of the program :-)
thank you so very much(:
Join our real-time social learning platform and learn together with your friends!