On Mon, Mar 11, 2013 at 4:42 AM, mukesh tiwari <mukeshtiwari.ii...@gmail.com> wrote: > I am trying to solve this problem[1] using regular expression. I wrote this > code but I am getting time limit exceed. Could some one please tell me how to > make this code run faster.
What is the time limit? I just tried it (Python 2.6 under Windows) and it finished in a humanly-immeasurable amount of time. Are you sure that STDIN (eg raw_input()) is where your test data is coming from? ChrisA -- http://mail.python.org/mailman/listinfo/python-list