On Monday, April 8, 2019 at 4:46:32 AM UTC+5:30, Pablo Heiber wrote:
> Hi,
>
>
>
> You are welcome to do with your code whatever you want after the round is
> over, including posting it in this mailing list for help. As you probably
> saw, many others did.
>
>
> Best,
> Pablo
>
>
> On Sun, Apr 7, 2019 at 6:27 AM ACTECH <[email protected]> wrote:
> I had participated in codejam 2019,
>
> I solved 3 problems , However 1 problem got Runtime error in the platform
> while it was running fine in my platform
>
>
>
> --
>
> 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 post to this group, send email to [email protected].
>
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/google-code/a50bdeab-e05e-45b4-80d6-089939a2302a%40googlegroups.com.
>
> For more options, visit https://groups.google.com/d/optout.
from functools import reduce
import operator
def factors(n):
return list(set(reduce(list.__add__,
([i, n//i] for i in range(2, int(n**0.5) + 1) if n % i == 0))))
t=int(input())
for ix in range(1,t+1):
n,l=map(int,input().rstrip().split())
s=str(input())
ls=list(s.split(" "))
j=0
dict={}
al=[]
nm=[]
for i in range(65,92):
al.append(chr(i))
fls=[]
for i in ls:
fls.append(factors(int(i)))
l=factors(int(ls[0]))
if int(ls[1])%l[0]==0:
pv=l[0]
ov=l[1]
else:
pv=l[1]
ov=l[0]
lll=[]
lll.append(ov)
lll.append(pv)
for i in range(1,len(ls)):
pv=int(ls[i])//pv
lll.append(pv)
llp=sorted(list(set(lll)))
llt=[]
for i in lll:
llt.append(al[llp.index(i)])
strg="".join(llt)
print("Case #{}: {}".format(ix,strg))
Its only rejected in the Codejam IDE ohterwise it runs fine in every other
platform
--
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 post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/google-code/b6c652a1-4f6a-489b-a842-d503226df80b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.