GETTING WRONG ANSWER IN TOTR. PLEASE HELP

My Code Is working fine for all test cases but giving wrong answer on submission. Heres my Python Code.

here is the problem : https://www.codechef.com/problems/TOTR
here is the link of the submitted solution : https://www.codechef.com/viewsolution/24896083

import string
t,m=raw_input().split()
bs=“abcdefghijklmnopqrstuvwxyz”
es=“qwertyuiopasdfghjklzxcvbnm”
bsl=list(bs)
esl=list(es)
for i in range(int(t)):
ind=0
os=""
s=raw_input()
for x in s:
if x=="_":
os=os+" "
elif x=="?":
os=os+"?"
elif x==".":
os=os+"."
elif x=="!":
os=os+"!"
elif x==",":
os=os+","
else:
ind=bs.index(x.lower())
if x.isupper():
os=os+esl[ind].upper()
else:
os=os+esl[ind]
print os

Provide the link of problem statement also. And don’t paste the code here. You can either use https://ideone.com or give the link of submitted solution.

here is the problem : https://www.codechef.com/problems/TOTR
here is the link of the submitted solution : https://www.codechef.com/viewsolution/24896083

You are not using the input string m, you are using the sample input test string. Here is the fixed solution: https://www.codechef.com/viewsolution/24896594 :slight_smile: Well done

1 Like

ohh i see, yeah i just missed that. Thanks alot for helping. :slight_smile:

1 Like