ALETHIO - Editorial

What exactly do you mean by no input??
The Problem says 1<=|S|<=1000

@bodmas… C23DB34 will your code works for this test case.

@sid_iiita - yu are using long long… yu shuld change your algo… to keep it in string… otherwise your ans will overflow… check this input…
DDDDDDDDDDD66666666666666666666666666666UYIWUYRR
yu are getting WA

wow, you got me on that! The code doesn’t handle that scenario, though it managed to get an AC :slight_smile:

@kashish55 thanxx for help :smiley:
silly of me

i think my approach was simpler than many described here ; I did’nt realise the case of leading zeros until i read this editorial … my approach was to convert contiguous numbers and look for max and in case of letters look nearby for contiguous numbers and compare the newly formed number (with the letter as number 9) with standing maximum. Python takes good care of large numbers/inputs …so yay to python!

I think this solution is much better than editorial, and this is he way we should do it…nice bodmas…

I have modified your code to handle cases like C23DB34.
http://www.codechef.com/viewsolution/2312243