+ 2
Does anyone know how to solve the next lucky ticket problem?
if you haven't heard it then let me describe it.. let's assume you bought a lottery ticket which has number in 6 digits and you're considered as a winner if the sum of first three digits is equal to last three digit. you've to check the number. if it's already lucky number then fine else you've to print next lucky number. you can't change the first three digits. ... if anyone know how to solve it.. please tell me.
1 Respuesta
0
"next" lucky number means the closest to the original, be it smaller or greater, right? I mean, if your original number is 100700 the closest would be 100100. Is that so? If not, clarify. Give some examples.