I have tried every single trial case and it is running of every single case with no errors .on codechef it shows wa .I have checked and now looking forward to this forum.I have started coding so pls help me out.
January challenge DIVISION3 decode it problem
here is the link:
try:
T=int(input())
for i in range(T):
List1=[‘a’,‘b’,‘c’,‘d’,‘e’,‘f’,‘g’,‘h’,‘i’,‘j’,‘k’,‘l’,‘m’,‘n’,‘o’,‘p’]
N=int(input())
S=input()
S=list(S)
for i in range(len(S)):
S[i]=int(S[i])
NewList=[]
string =“”
while(len(S)/4!=1):
l=S[0:4]
del S[0:4]
i=0
while(l[i]==0 or l[i]==1):
end=int(len(List1))
mid=int(len(List1)/2)
if(len(List1)!=1 and l[i]==0):
List1=List1[0:mid]
if(len(List1)!=1 and l[i]==1):
List1=List1[mid:end]
if(len(List1)==1):
NewList.append(List1)
break;
i=i+1
if(len(S)/4==1):
List1=['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p']
i=0
while((S[i]==0 or S[i]==1)):
mid=int(len(List1)/2)
end=int(len(List1))
if(len(List1)!=1 and S[i]==0):
List1=List1[0:mid]
if(len(List1)!=1 and S[i]==1):
List1=List1[mid:end]
if(len(List1)==1):
NewList.append(List1)
break;
i=i+1
st1=""
str1=""
for i in NewList:
str1+=st1.join(i)
print(str1)
except Exception as e:
pass