Idk if anybody still needs it but I've just solved the same issue in my 
solution.
Runtime Error on the hidden set was caused by using '/' instead of '//' 
with enormous numbers

On Monday, April 8, 2019 at 12:21:03 AM UTC+3, Prashanth Varma wrote:
>
> On Sunday, April 7, 2019 at 9:27:20 AM UTC-4, zombiepunkman wrote: 
> > I am unable to debug the runtime error in this solution to 
> Cryptopangrams problem. 
> > Please help. 
> > 
> > def gcd(a,b): 
> >         for i in range(min(a,b),0,-1): 
> >                 if(a % i == 0 and b % i == 0): 
> >                         return i 
> > 
> > 
> > 
> > if __name__=='__main__': 
> >         alphabets = "ABCDEFGHIJKLMNOPQRSTUVWXYZ" 
> >         T = int(input()) 
> >         answers = ["" for i in range(T)] 
> >         for i in range(0,T): 
> >                 N,L = [int(s) for s in input().split(" ")]         
> >                 divisors = [] 
> >                 values = [int(s) for s in input().split(" ")] 
> >                 div = gcd(values[0],values[1]) 
> >                 divisors.append(int(values[0]/div)) 
> >                 divisors.append(div) 
> >                 for j in values[1:len(values)]: 
> >                         div = int(j/div) 
> >                         divisors.append(div) 
> >                 primes = list(set(divisors)) 
> >                 primes.sort() 
> >                 for j in range(0,len(divisors)): 
> >                         answers[i] += 
> alphabets[primes.index(divisors[j])] 
> >         for i in range(0,T): 
> >                 print("Case #{}: {}".format(i+1,answers[i])) 
> > 
> > 
> > Python version 3.6 
>
> Many people got the same issue. I too got the RE. I dont know where we 
> went wrong

-- 
You received this message because you are subscribed to the Google Groups 
"Google Code Jam" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-code/b578ee4c-d98e-44e2-9389-0a24a8708e63%40googlegroups.com.

Reply via email to