+ 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.

29th Jul 2017, 12:28 PM
Rijwan Khan
Rijwan Khan - avatar
1 Antwort
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.
4th Aug 2017, 1:44 PM
lion
lion - avatar