Reputation:
I am not here to ask any solution. Please keep in mind. I am tring to solve a problem April challange. My solution gives correct output when i run it using python over my computer but it gives runtime error when i submit the code. I dont want to give the whole code as its ongoing contest.
I am sure i have taken care of all the boundary conditions. Here is what i am trying to do. Simply i am traversing the array and doing some operations as given in the problem.
problem link(if u want to see ranges of integers used)
http://www.codechef.com/APRIL14/problems/ADIGIT
n,t=map(int,raw_input().split())
a=raw_input()
a=[int(s) for s in a]
while(t):
//do something
t=t-1
Upvotes: 0
Views: 246
Reputation: 10904
Most of the time runtime error occurs when you try to access the invalid memory or declare a huge bunch of memory.
Upvotes: 3