You output 'case# 1 : ...' instead of 'Case #1: ...'.

Besides, what for you need to store all the input? I would also minimize
the presence of formulae in contest situation - if you want to reverse each
action, just reverse each action - there are len(road) of them. Or even
just map().

чт, 11 апр. 2019 г., 23:03 Ilef Dey <[email protected]>:

> this is my code, cam you tell me where i went wrong, i just did the
> opposite of every step of lydia's path and got WA. I also want to
> understand how the pjudge system works.
> my code is in python
> def maze(N,road):
>     solution=''
>     for i in range(2*N-2):
>
>         if road[i]=='E':
>             solution=solution+'S'
>         else:
>             solution=solution+'E'
>     return(solution)
> T=int(input('test cases'))
> D=[]
> S=[]
> for j in range(T):
>     N =int(input('dimension'))
>     D.append(N)
>     road=input("Lydia's path")
>     S.append(road)
> for k in range(T):
>     print('case#',k+1, ':',maze(D[k],S[k]))
>
> Le jeu. 11 avr. 2019 à 21:57, Ilef Dey <[email protected]> a écrit :
>
>> I had the same logic and it showed me WA
>>
>> On Mon, Apr 8, 2019, 05:36 Ronan Burke <[email protected]> wrote:
>>
>>> My solution for this one was to just do the opposite of the route the
>>> other person took. If you did something other than, I imagine things could
>>> get quite messy and it would be easy to make a mistake.
>>>
>>> Their route: "SSEESE" then I would do "EESSES"
>>>
>>> --
>>> 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/7f2f7c1f-1e3c-46ed-8253-af9d8beeae07%40googlegroups.com
>>> .
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>> --
> 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/CA%2BSEAKLBeaWG0bQJ9Q99RL7GHPYvXdpeTPeiqDPUn3WV5MrfGA%40mail.gmail.com
> <https://groups.google.com/d/msgid/google-code/CA%2BSEAKLBeaWG0bQJ9Q99RL7GHPYvXdpeTPeiqDPUn3WV5MrfGA%40mail.gmail.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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/CANBUrM9vhfcTMwAnxY_rjyRjwY8WO8r8pTVgfODWZXHjt06fJg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to