El lunes, 8 de abril de 2019, 22:41:03 (UTC+2), ACTECH  escribió:
> On Monday, April 8, 2019 at 11:09:13 PM UTC+5:30, Marcel Ubach wrote:
> > El domingo, 7 de abril de 2019, 23:21:04 (UTC+2), Fixman  escribió:
> > > There are a couple of edge cases that aren't present in the test cases:
> > > 
> > > 
> > > * Strings with repeated letters "AAAAAAABC". 
> > > * Strings with alternate letters "ABABABABACD". 
> > > * Strings with really big primes. 
> > > 
> > > 
> > > On Sun, 7 Apr 2019, 14:27 , <[email protected]> wrote:
> > > Had success with the tests but RE on the main run. Looks like other 
> > > participants had the same issue.
> > > 
> > > 
> > > 
> > > -- 
> > > 
> > > 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/06f41eee-5b08-4588-9717-64c8b9967993%40googlegroups.com.
> > > 
> > > For more options, visit https://groups.google.com/d/optout.
> > 
> > Yes, I thimk 90% of questions about this problem can be answered checking 
> > the solution against these insidious edge cases. Here is a sample testcase:
> > 
> > 6
> > 101 32
> > 6 6 6 6 4 6 6 6 15 55 143 221 323 437 667 899 1147 1517 1763 2021 2491 3127 
> > 3599 4087 4757 5183 5767 6557 7387 8633 9797 10403
> > 101 31
> > 6 6 6 15 15 6 6 15 55 143 221 323 437 667 899 1147 1517 1763 2021 2491 3127 
> > 3599 4087 4757 5183 5767 6557 7387 8633 9797 10403
> > 101 31
> > 6 6 6 4 6 6 6 15 55 143 221 323 437 667 899 1147 1517 1763 2021 2491 3127 
> > 3599 4087 4757 5183 5767 6557 7387 8633 9797 10403
> > 101 30
> > 6 6 15 15 6 6 15 55 143 221 323 437 667 899 1147 1517 1763 2021 2491 3127 
> > 3599 4087 4757 5183 5767 6557 7387 8633 9797 10403
> > 101 27
> > 4 4 6 15 55 143 221 323 437 667 899 1147 1517 1763 2021 2491 3127 3599 4087 
> > 4757 5183 5767 6557 7387 8633 9797 10403
> > 101 25
> > 6 15 55 143 221 323 437 667 899 1147 1517 1763 2021 2491 3127 3599 4087 
> > 4757 5183 5767 6557 7387 8633 
> > 969999999999999999999999999999999999999999999999999999999999999999999999999999999999998933
> >  
> > 999999999999999999999999999999999999999999999999999999999999999999999999999999999999998790000000000000000000000000000000000000000000000000000000000000000000000000000000000000121
> > 
> > The output should be:
> > 
> > Case #1: ABABAABABCDEFGHIJKLMNOPQRSTUVWXYZ
> > Case #2: ABABCBABCDEFGHIJKLMNOPQRSTUVWXYZ
> > Case #3: BABAABABCDEFGHIJKLMNOPQRSTUVWXYZ
> > Case #4: BABCBABCDEFGHIJKLMNOPQRSTUVWXYZ
> > Case #5: AAABCDEFGHIJKLMNOPQRSTUVWXYZ
> > Case #6: ABCDEFGHIJKLMNOPQRSTUVWXYZ
> > 
> > Hope this helps
> 
> Now How can it be explained ?
> even your test cases are running successfully!!
> 
> Still the codejam interface showing RE !! Astonishining!!
> 
> def factors(n):
>     ls=[]
>     for i in range(2,n//2+1):
>         if n%i==0:
>             ls.append(i)
>             break
>     ls.append(n//ls[0])
> 
>     return ls
> 
> 
> t=int(input())
> #start_time = time.time()
> 
> for ix in range(1,t+1):
>     n,l=map(int,input().rstrip().split(" "))
>     s=str(input().rstrip())
>     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))
>     #print("--- %s seconds ---" % (time.time() - start_time))
> 
> 
> You can check and PLEASE PROVIDE A FEEDBACK WHATS WRONG???

Try this one:

1
101 30
6 6 4 6 6 6 15 55 143 221 323 437 667 899 1147 1517 1763 2021 2491 3127 3599 
4087 4757 5183 5767 6557 7387 8633 9797 10403

The output should be:

Case #1: ABAABABCDEFGHIJKLMNOPQRSTUVWXYZ

But your code returns:

Case #1: CBCAEAEBODPFQGRHSITJUKVLWMXNYOZ

-- 
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/c08a3c36-dbf0-466c-aee6-ab92c95c3934%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to