@Gunjan Sharma:
Why do you think 5555500000 is not an acceptable answer???
You might be thinking last 5 zeroes not representing the number of zeroes
followed..thus you gave an answer as 1111111110 in one of your previous
post...
But as per the problem is exemplified, *if it is the original precise
problem*, 5555500000 is correct and best...
for e.g. see example given in problem statement: *9000000000*...As per your
logic this must also not be correct...
I agree with you that *(problem statement) U (example given) --> ambiguous*
..
In fact statement must be like this-
Device a 10 digit number such that

a] each *NON-ZERO* digit represents the number of zeros(not necessarily
immediate) following it(eg 9000000000)
b] such that sum of non zero digits in this number is maximum...

As per this problem definition following numbers become invalid
                           1010101010....4000040000...because
num_of_zeroes_following first 4 are 4+4 -->8..same logic with
1010101010...whereas number like 5040302010....8000040000 are valid..

In this case, 5555500000 is best....Correct me, if I'm wrong in any point or

if i Cunningly:(:P :P)modified problem statement too much to get it
Unambiguous !!!

-- 
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to algogeeks@googlegroups.com.
To unsubscribe from this group, send email to 
algogeeks+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/algogeeks?hl=en.

Reply via email to