+ 3

Challenge (Jack's Lucky Ticket)

One day, Jack was going home by tram. When he got his ticket, he noticed that number on the ticket was not lucky. A lucky ticket is a six-digit number on the ticket in which sum of the first three digits is equal to the sum of the last three digits.For example, number 165912 is lucky because sum of ,1+6+5=12 and 9+1+2= 12. Since the number on the ticket wasn't lucky, Jack needs your help to find the next lucky ticket number.eg, if Jack's ticket number is 165901, then the next lucky ticket num 165903

9th Oct 2017, 10:25 AM
Akhil Manchanda
Akhil Manchanda - avatar
4 Answers
9th Oct 2017, 12:38 PM
Krishna Teja Yeluripati
Krishna Teja Yeluripati - avatar
9th Oct 2017, 6:19 PM
Kartikey Sahu
Kartikey Sahu - avatar
12th Oct 2017, 12:45 PM
Gagan $ingh
Gagan $ingh - avatar
https://code.sololearn.com/cgd0Ao7O8JkA/?ref=app My try in python.
12th Oct 2017, 5:06 PM
AlphaCoder - avatar