Can anyone please help me sort this runtime error out. It runs perfectly on my
system but codingjam gives back RE
import sys
.stdout.flush()
T = int(input())
lydia = 'EESSSESE'
for case in range(1, T+1):
N = int(input())
maze = 2*N - 2
diff = len(lydia) - maze
if diff >= 0:
lst = []
P = lydia[-maze:]
print(P)
for i in range(len(P)):
if P[i] == 'S':
lst.append('E')
else:
lst.append('S')
y = ''.join(lst)
print('Case #{}: {}'.format(case, y))
continue
else:
lst = []
diff = diff * -1
P = lydia
for i in range(len(P)):
if P[i] == 'S':
lst.append('E')
else: lst.append('S')
y = ''.join(lst)
temp = list()
temp2 = list()
for i in range(diff):
if i%2 == 0:
temp.append('S')
else: temp.append('E')
for j in temp:
if j == 'S':
temp2.append('E')
else: temp2.append('S')
P = P + ''.join(temp)
y = y + ''.join(temp2)
print(P)
print('Case #{}: {}'.format(case, y))
sys.exit()
--
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/affcfacd-2302-443c-a7b5-361252687e71%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.