submission_id string | problem_id string | status string | code string | input string | output string | problem_description string |
|---|---|---|---|---|---|---|
s345440795 | p00017 | Wrong Answer | def judge_the(word):
length=ord('t')-ord(word[0])
if ord('h')-ord(word[1])==ord('e')-ord(word[2])==length:
return True
else:
return False
A=list(map(str,input().split()))
l=int()
for i in A:
if len(i)==3:
if judge_the(i)==True:
l=ord('t')-ord(i[0])
break
for i in A:
for c in i:
if c=='.':
print(c,end="")
else:
print(chr(ord(c)+l),end="")
if i!=A[-1]:
print(end=" ")
#else:
# print() | xlmw mw xli tmgxyvi xlex m xsso mr xli xvmt.
| this is the picture that i took in the trip.
|
<H1>Caesar Cipher</H1>
<p>
In cryptography, Caesar cipher is one of the simplest and most widely known encryption method. Caesar cipher is a type of substitution cipher in which each letter in the text is replaced by a letter some fixed number of positions down the alphabet. For example, with a shift of 1, 'a' would be replaced by 'b', 'b' would become 'c', 'y' would become 'z', 'z' would become 'a', and so on. In that case, a text:
<pre>
this is a pen
</pre>
<p>
is would become:
</p>
<pre>
uijt jt b qfo
</pre>
<p>
Write a program which reads a text encrypted by Caesar Chipher and prints the corresponding decoded text. The number of shift is secret and it depends on datasets, but you can assume that the decoded text includes any of the following words: "the", "this", or "that".
</p>
<H2>Input</H2>
<p>
Input consists of several datasets. Each dataset consists of texts in a line. Input ends with EOF. The text consists of lower-case letters, periods, space, and end-of-lines. Only the letters have been encrypted. A line consists of at most 80 characters.
</p>
<p>
You may assume that you can create one decoded text which includes any of "the", "this", or "that" from the given input text.
</p>
<p>
The number of datasets is less than or equal to 20.
</p>
<H2>Output</H2>
<p>
Print decoded texts in a line.
</p>
<H2>Sample Input</H2>
<pre>
xlmw mw xli tmgxyvi xlex m xsso mr xli xvmt.
</pre>
<H2>Output for the Sample Input</H2>
<pre>
this is the picture that i took in the trip.
</pre>
|
s429386183 | p00017 | Wrong Answer | def judge_the(word):
length=ord('t')-ord(word[0])
if ord('h')-ord(word[1])==ord('e')-ord(word[2])==length:
return True
else:
return False
A=list(map(str,input().split()))
l=int()
for i in A:
if len(i)==3:
if judge_the(i)==True:
l=ord('t')-ord(i[0])
break
for i in A:
for c in i:
if c=='.':
print(c,end="")
else:
print(chr(ord(c)+l),end="")
if i!=A[-1]:
print(end=" ")
else:
print() | xlmw mw xli tmgxyvi xlex m xsso mr xli xvmt.
| this is the picture that i took in the trip.
|
<H1>Caesar Cipher</H1>
<p>
In cryptography, Caesar cipher is one of the simplest and most widely known encryption method. Caesar cipher is a type of substitution cipher in which each letter in the text is replaced by a letter some fixed number of positions down the alphabet. For example, with a shift of 1, 'a' would be replaced by 'b', 'b' would become 'c', 'y' would become 'z', 'z' would become 'a', and so on. In that case, a text:
<pre>
this is a pen
</pre>
<p>
is would become:
</p>
<pre>
uijt jt b qfo
</pre>
<p>
Write a program which reads a text encrypted by Caesar Chipher and prints the corresponding decoded text. The number of shift is secret and it depends on datasets, but you can assume that the decoded text includes any of the following words: "the", "this", or "that".
</p>
<H2>Input</H2>
<p>
Input consists of several datasets. Each dataset consists of texts in a line. Input ends with EOF. The text consists of lower-case letters, periods, space, and end-of-lines. Only the letters have been encrypted. A line consists of at most 80 characters.
</p>
<p>
You may assume that you can create one decoded text which includes any of "the", "this", or "that" from the given input text.
</p>
<p>
The number of datasets is less than or equal to 20.
</p>
<H2>Output</H2>
<p>
Print decoded texts in a line.
</p>
<H2>Sample Input</H2>
<pre>
xlmw mw xli tmgxyvi xlex m xsso mr xli xvmt.
</pre>
<H2>Output for the Sample Input</H2>
<pre>
this is the picture that i took in the trip.
</pre>
|
s251848690 | p00017 | Wrong Answer | def judge_the(word):
length=ord('t')-ord(word[0])
if ord('h')-ord(word[1])==ord('e')-ord(word[2])==length:
return True
else:
return False
while True:
try:
A=list(map(str,input().split()))
l=int()
for i in A:
if len(i)==3:
if judge_the(i)==True:
l=ord('t')-ord(i[0])
break
for i in A:
for c in i:
if c=='.':
print(c,end="")
else:
print(chr(ord(c)+l),end="")
if i!=A[-1]:
print(end=" ")
else:
print()
except EOFError:
break | xlmw mw xli tmgxyvi xlex m xsso mr xli xvmt.
| this is the picture that i took in the trip.
|
<H1>Caesar Cipher</H1>
<p>
In cryptography, Caesar cipher is one of the simplest and most widely known encryption method. Caesar cipher is a type of substitution cipher in which each letter in the text is replaced by a letter some fixed number of positions down the alphabet. For example, with a shift of 1, 'a' would be replaced by 'b', 'b' would become 'c', 'y' would become 'z', 'z' would become 'a', and so on. In that case, a text:
<pre>
this is a pen
</pre>
<p>
is would become:
</p>
<pre>
uijt jt b qfo
</pre>
<p>
Write a program which reads a text encrypted by Caesar Chipher and prints the corresponding decoded text. The number of shift is secret and it depends on datasets, but you can assume that the decoded text includes any of the following words: "the", "this", or "that".
</p>
<H2>Input</H2>
<p>
Input consists of several datasets. Each dataset consists of texts in a line. Input ends with EOF. The text consists of lower-case letters, periods, space, and end-of-lines. Only the letters have been encrypted. A line consists of at most 80 characters.
</p>
<p>
You may assume that you can create one decoded text which includes any of "the", "this", or "that" from the given input text.
</p>
<p>
The number of datasets is less than or equal to 20.
</p>
<H2>Output</H2>
<p>
Print decoded texts in a line.
</p>
<H2>Sample Input</H2>
<pre>
xlmw mw xli tmgxyvi xlex m xsso mr xli xvmt.
</pre>
<H2>Output for the Sample Input</H2>
<pre>
this is the picture that i took in the trip.
</pre>
|
s817502016 | p00017 | Wrong Answer | def judge_the(word):
length=ord('t')-ord(word[0])
if ord('h')-ord(word[1])==ord('e')-ord(word[2])==length:
return True
else:
return False
while True:
try:
A=list(map(str,input().split()))
l=int()
for i in A:
if len(i)==3:
if judge_the(i)==True:
l=ord('t')-ord(i[0])
break
for i in A:
for c in i:
C=ord(c)+l
if C<0:
C+=26
if c=='.':
print(c,end="")
else:
print(chr(ord(c)+l),end="")
if i!=A[-1]:
print(end=" ")
else:
print()
except EOFError:
break | xlmw mw xli tmgxyvi xlex m xsso mr xli xvmt.
| this is the picture that i took in the trip.
|
<H1>Caesar Cipher</H1>
<p>
In cryptography, Caesar cipher is one of the simplest and most widely known encryption method. Caesar cipher is a type of substitution cipher in which each letter in the text is replaced by a letter some fixed number of positions down the alphabet. For example, with a shift of 1, 'a' would be replaced by 'b', 'b' would become 'c', 'y' would become 'z', 'z' would become 'a', and so on. In that case, a text:
<pre>
this is a pen
</pre>
<p>
is would become:
</p>
<pre>
uijt jt b qfo
</pre>
<p>
Write a program which reads a text encrypted by Caesar Chipher and prints the corresponding decoded text. The number of shift is secret and it depends on datasets, but you can assume that the decoded text includes any of the following words: "the", "this", or "that".
</p>
<H2>Input</H2>
<p>
Input consists of several datasets. Each dataset consists of texts in a line. Input ends with EOF. The text consists of lower-case letters, periods, space, and end-of-lines. Only the letters have been encrypted. A line consists of at most 80 characters.
</p>
<p>
You may assume that you can create one decoded text which includes any of "the", "this", or "that" from the given input text.
</p>
<p>
The number of datasets is less than or equal to 20.
</p>
<H2>Output</H2>
<p>
Print decoded texts in a line.
</p>
<H2>Sample Input</H2>
<pre>
xlmw mw xli tmgxyvi xlex m xsso mr xli xvmt.
</pre>
<H2>Output for the Sample Input</H2>
<pre>
this is the picture that i took in the trip.
</pre>
|
s403139078 | p00017 | Wrong Answer | def judge_the(word):
length=ord('t')-ord(word[0])
if ord('h')-ord(word[1])==ord('e')-ord(word[2])==length:
return True
else:
return False
while True:
try:
A=list(map(str,input().split()))
l=int()
for i in A:
if len(i)==3:
if judge_the(i)==True:
l=ord('t')-ord(i[0])
break
for i in A:
for c in i:
C=ord(c)+l
if C<97:
C+=26
if c=='.':
print(c,end="")
else:
print(chr(C),end="")
if i!=A[-1]:
print(end=" ")
else:
print()
except EOFError:
break | xlmw mw xli tmgxyvi xlex m xsso mr xli xvmt.
| this is the picture that i took in the trip.
|
<H1>Caesar Cipher</H1>
<p>
In cryptography, Caesar cipher is one of the simplest and most widely known encryption method. Caesar cipher is a type of substitution cipher in which each letter in the text is replaced by a letter some fixed number of positions down the alphabet. For example, with a shift of 1, 'a' would be replaced by 'b', 'b' would become 'c', 'y' would become 'z', 'z' would become 'a', and so on. In that case, a text:
<pre>
this is a pen
</pre>
<p>
is would become:
</p>
<pre>
uijt jt b qfo
</pre>
<p>
Write a program which reads a text encrypted by Caesar Chipher and prints the corresponding decoded text. The number of shift is secret and it depends on datasets, but you can assume that the decoded text includes any of the following words: "the", "this", or "that".
</p>
<H2>Input</H2>
<p>
Input consists of several datasets. Each dataset consists of texts in a line. Input ends with EOF. The text consists of lower-case letters, periods, space, and end-of-lines. Only the letters have been encrypted. A line consists of at most 80 characters.
</p>
<p>
You may assume that you can create one decoded text which includes any of "the", "this", or "that" from the given input text.
</p>
<p>
The number of datasets is less than or equal to 20.
</p>
<H2>Output</H2>
<p>
Print decoded texts in a line.
</p>
<H2>Sample Input</H2>
<pre>
xlmw mw xli tmgxyvi xlex m xsso mr xli xvmt.
</pre>
<H2>Output for the Sample Input</H2>
<pre>
this is the picture that i took in the trip.
</pre>
|
s655375698 | p00017 | Wrong Answer | def judge_the(word):
length=ord('t')-ord(word[0])
if ord('h')-ord(word[1])==ord('e')-ord(word[2])==length:
return True
else:
return False
def change(string,l):
string1=""
for i in range(len(string)):
C=ord(string[i])+l
if C<97:
C+=26
elif C>122:
C-=26
string1+=chr(C) if string[i]!='.' else '.'
return string1
while True:
try:
A=list(map(str,input().split()))
l=int()
for i in A:
if len(i)==3:
if judge_the(i)==True:
l=ord('t')-ord(i[0])
break
Ans=[""]*len(A)
for i in range(len(A)):
Ans[i]=change(A[i],l)
print(" ".join(Ans))
except EOFError:
break | xlmw mw xli tmgxyvi xlex m xsso mr xli xvmt.
| this is the picture that i took in the trip.
|
<H1>Caesar Cipher</H1>
<p>
In cryptography, Caesar cipher is one of the simplest and most widely known encryption method. Caesar cipher is a type of substitution cipher in which each letter in the text is replaced by a letter some fixed number of positions down the alphabet. For example, with a shift of 1, 'a' would be replaced by 'b', 'b' would become 'c', 'y' would become 'z', 'z' would become 'a', and so on. In that case, a text:
<pre>
this is a pen
</pre>
<p>
is would become:
</p>
<pre>
uijt jt b qfo
</pre>
<p>
Write a program which reads a text encrypted by Caesar Chipher and prints the corresponding decoded text. The number of shift is secret and it depends on datasets, but you can assume that the decoded text includes any of the following words: "the", "this", or "that".
</p>
<H2>Input</H2>
<p>
Input consists of several datasets. Each dataset consists of texts in a line. Input ends with EOF. The text consists of lower-case letters, periods, space, and end-of-lines. Only the letters have been encrypted. A line consists of at most 80 characters.
</p>
<p>
You may assume that you can create one decoded text which includes any of "the", "this", or "that" from the given input text.
</p>
<p>
The number of datasets is less than or equal to 20.
</p>
<H2>Output</H2>
<p>
Print decoded texts in a line.
</p>
<H2>Sample Input</H2>
<pre>
xlmw mw xli tmgxyvi xlex m xsso mr xli xvmt.
</pre>
<H2>Output for the Sample Input</H2>
<pre>
this is the picture that i took in the trip.
</pre>
|
s880222452 | p00017 | Wrong Answer | def judge_the(word):
length=ord('t')-ord(word[0])
if ord('h')-ord(word[1])==ord('e')-ord(word[2])==length:
return True
else:
return False
def judge_this(word):
length=ord('t')-ord(word[0])
if ord('h')-ord(word[1])==ord('i')-ord(word[2])==ord('s')-ord(word[3])==length:
return True
else:
return False
def judge_that(woed):
length=ord('t')-ord(word[0])
if ord('h')-ord(word[1])==ord('a')-ord(word[2])==ord('t')-ord(word[3])==length:
return True
else:
return False
def change(string,l):
string1=""
for i in range(len(string)):
C=ord(string[i])+l
if C<97:
C+=26
elif C>122:
C-=26
string1+=chr(C) if string[i]!='.' else '.'
return string1
while True:
try:
A=list(map(str,input().split()))
l=int()
for i in A:
if len(i)==3:
if judge_the(i)==True:
l=ord('t')-ord(i[0])
break
elif len(i)==4:
if judge_this(i)==True or judge_that(i)==True:
l=ord('t')-ord(i[0])
break
else:
break#while?????????
Ans=[""]*len(A)
for i in range(len(A)):
Ans[i]=change(A[i],l)
print(" ".join(Ans))
except EOFError:
break | xlmw mw xli tmgxyvi xlex m xsso mr xli xvmt.
| this is the picture that i took in the trip.
|
<H1>Caesar Cipher</H1>
<p>
In cryptography, Caesar cipher is one of the simplest and most widely known encryption method. Caesar cipher is a type of substitution cipher in which each letter in the text is replaced by a letter some fixed number of positions down the alphabet. For example, with a shift of 1, 'a' would be replaced by 'b', 'b' would become 'c', 'y' would become 'z', 'z' would become 'a', and so on. In that case, a text:
<pre>
this is a pen
</pre>
<p>
is would become:
</p>
<pre>
uijt jt b qfo
</pre>
<p>
Write a program which reads a text encrypted by Caesar Chipher and prints the corresponding decoded text. The number of shift is secret and it depends on datasets, but you can assume that the decoded text includes any of the following words: "the", "this", or "that".
</p>
<H2>Input</H2>
<p>
Input consists of several datasets. Each dataset consists of texts in a line. Input ends with EOF. The text consists of lower-case letters, periods, space, and end-of-lines. Only the letters have been encrypted. A line consists of at most 80 characters.
</p>
<p>
You may assume that you can create one decoded text which includes any of "the", "this", or "that" from the given input text.
</p>
<p>
The number of datasets is less than or equal to 20.
</p>
<H2>Output</H2>
<p>
Print decoded texts in a line.
</p>
<H2>Sample Input</H2>
<pre>
xlmw mw xli tmgxyvi xlex m xsso mr xli xvmt.
</pre>
<H2>Output for the Sample Input</H2>
<pre>
this is the picture that i took in the trip.
</pre>
|
s969955187 | p00017 | Wrong Answer | def judge_the(word):
length=ord('t')-ord(word[0])
if ord('h')-ord(word[1])==ord('e')-ord(word[2])==length:
return True
else:
return False
def judge_this(word):
length=ord('t')-ord(word[0])
if ord('h')-ord(word[1])==ord('i')-ord(word[2])==ord('s')-ord(word[3])==length:
return True
else:
return False
def judge_that(woed):
length=ord('t')-ord(word[0])
if ord('h')-ord(word[1])==ord('a')-ord(word[2])==ord('t')-ord(word[3])==length:
return True
else:
return False
def change(string,l):
string1=""
for i in range(len(string)):
C=ord(string[i])+l
if C<97:
C+=26
elif C>122:
C-=26
string1+=chr(C) if string[i]!='.' else '.'
return string1
while True:
A=list(map(str,input().split()))
l=int()
for i in A:
if len(i)==3:
if judge_the(i)==True:
l=ord('e')-ord(i[2])
break
elif len(i)==4:
if judge_this(i)==True :
l=ord('i')-ord(i[2])
break
elif judge_that(i)==True:
l=ord('a')-ord(i[2])
break
else:
break#while?????????
Ans=[""]*len(A)
for i in range(len(A)):
Ans[i]=change(A[i],l)
print(" ".join(Ans)) | xlmw mw xli tmgxyvi xlex m xsso mr xli xvmt.
| this is the picture that i took in the trip.
|
<H1>Caesar Cipher</H1>
<p>
In cryptography, Caesar cipher is one of the simplest and most widely known encryption method. Caesar cipher is a type of substitution cipher in which each letter in the text is replaced by a letter some fixed number of positions down the alphabet. For example, with a shift of 1, 'a' would be replaced by 'b', 'b' would become 'c', 'y' would become 'z', 'z' would become 'a', and so on. In that case, a text:
<pre>
this is a pen
</pre>
<p>
is would become:
</p>
<pre>
uijt jt b qfo
</pre>
<p>
Write a program which reads a text encrypted by Caesar Chipher and prints the corresponding decoded text. The number of shift is secret and it depends on datasets, but you can assume that the decoded text includes any of the following words: "the", "this", or "that".
</p>
<H2>Input</H2>
<p>
Input consists of several datasets. Each dataset consists of texts in a line. Input ends with EOF. The text consists of lower-case letters, periods, space, and end-of-lines. Only the letters have been encrypted. A line consists of at most 80 characters.
</p>
<p>
You may assume that you can create one decoded text which includes any of "the", "this", or "that" from the given input text.
</p>
<p>
The number of datasets is less than or equal to 20.
</p>
<H2>Output</H2>
<p>
Print decoded texts in a line.
</p>
<H2>Sample Input</H2>
<pre>
xlmw mw xli tmgxyvi xlex m xsso mr xli xvmt.
</pre>
<H2>Output for the Sample Input</H2>
<pre>
this is the picture that i took in the trip.
</pre>
|
s942265306 | p00017 | Wrong Answer | def judge_the(word):
length=ord('t')-ord(word[0])
if ord('h')-ord(word[1])==ord('e')-ord(word[2])==length:
return True
else:
return False
def judge_this(word):
length=ord('t')-ord(word[0])
if ord('h')-ord(word[1])==ord('i')-ord(word[2])==ord('s')-ord(word[3])==length:
return True
else:
return False
def judge_that(woed):
length=ord('t')-ord(word[0])
if ord('h')-ord(word[1])==ord('a')-ord(word[2])==ord('t')-ord(word[3])==length:
return True
else:
return False
def change(string,l):
string1=""
for i in range(len(string)):
C=ord(string[i])+l
if C<97:
C+=26
elif C>122:
C-=26
string1+=chr(C) if string[i]!='.' else '.'
return string1
while True:
try:
A=list(map(str,input().split()))
l=int()
for i in A:
if len(i)==3:
if judge_the(i)==True:
l=ord('e')-ord(i[2])
break
elif len(i)==4:
if judge_this(i)==True :
l=ord('i')-ord(i[2])
break
elif judge_that(i)==True:
l=ord('a')-ord(i[2])
break
else:
break#while?????????
Ans=[""]*len(A)
for i in range(len(A)):
Ans[i]=change(A[i],l)
print(" ".join(Ans))
except EOFError:
break | xlmw mw xli tmgxyvi xlex m xsso mr xli xvmt.
| this is the picture that i took in the trip.
|
<H1>Caesar Cipher</H1>
<p>
In cryptography, Caesar cipher is one of the simplest and most widely known encryption method. Caesar cipher is a type of substitution cipher in which each letter in the text is replaced by a letter some fixed number of positions down the alphabet. For example, with a shift of 1, 'a' would be replaced by 'b', 'b' would become 'c', 'y' would become 'z', 'z' would become 'a', and so on. In that case, a text:
<pre>
this is a pen
</pre>
<p>
is would become:
</p>
<pre>
uijt jt b qfo
</pre>
<p>
Write a program which reads a text encrypted by Caesar Chipher and prints the corresponding decoded text. The number of shift is secret and it depends on datasets, but you can assume that the decoded text includes any of the following words: "the", "this", or "that".
</p>
<H2>Input</H2>
<p>
Input consists of several datasets. Each dataset consists of texts in a line. Input ends with EOF. The text consists of lower-case letters, periods, space, and end-of-lines. Only the letters have been encrypted. A line consists of at most 80 characters.
</p>
<p>
You may assume that you can create one decoded text which includes any of "the", "this", or "that" from the given input text.
</p>
<p>
The number of datasets is less than or equal to 20.
</p>
<H2>Output</H2>
<p>
Print decoded texts in a line.
</p>
<H2>Sample Input</H2>
<pre>
xlmw mw xli tmgxyvi xlex m xsso mr xli xvmt.
</pre>
<H2>Output for the Sample Input</H2>
<pre>
this is the picture that i took in the trip.
</pre>
|
s818309882 | p00017 | Wrong Answer | #encoding=utf-8
ans = ""
def inp():
split_word = raw_input().split()
return split_word
def rot(split_word):
for i in xrange(len(split_word)):
tako = ""
if len(split_word[i]) == 4 or len(split_word[i]) == 3:
num = ord(split_word[i][0]) - ord("t")
for j in xrange(len(split_word[i])):
tako += chr(ord(split_word[i][j]) - num)
if tako == "that" or tako == "the" or tako == "this":
return proce(split_word, num)
else:
pass
num = 0
def proce(split_word, num):
ans = ""
for i in xrange(len(split_word)):
for j in xrange(len(split_word[i])):
if split_word[i][j] == ".":
ans += split_word[i][j]
return ans
else:
ans += str(chr(ord(split_word[i][j]) - num))
ans += " "
return ans
if __name__ == "__main__":
word = inp()
print rot(word) | xlmw mw xli tmgxyvi xlex m xsso mr xli xvmt.
| this is the picture that i took in the trip.
|
<H1>Caesar Cipher</H1>
<p>
In cryptography, Caesar cipher is one of the simplest and most widely known encryption method. Caesar cipher is a type of substitution cipher in which each letter in the text is replaced by a letter some fixed number of positions down the alphabet. For example, with a shift of 1, 'a' would be replaced by 'b', 'b' would become 'c', 'y' would become 'z', 'z' would become 'a', and so on. In that case, a text:
<pre>
this is a pen
</pre>
<p>
is would become:
</p>
<pre>
uijt jt b qfo
</pre>
<p>
Write a program which reads a text encrypted by Caesar Chipher and prints the corresponding decoded text. The number of shift is secret and it depends on datasets, but you can assume that the decoded text includes any of the following words: "the", "this", or "that".
</p>
<H2>Input</H2>
<p>
Input consists of several datasets. Each dataset consists of texts in a line. Input ends with EOF. The text consists of lower-case letters, periods, space, and end-of-lines. Only the letters have been encrypted. A line consists of at most 80 characters.
</p>
<p>
You may assume that you can create one decoded text which includes any of "the", "this", or "that" from the given input text.
</p>
<p>
The number of datasets is less than or equal to 20.
</p>
<H2>Output</H2>
<p>
Print decoded texts in a line.
</p>
<H2>Sample Input</H2>
<pre>
xlmw mw xli tmgxyvi xlex m xsso mr xli xvmt.
</pre>
<H2>Output for the Sample Input</H2>
<pre>
this is the picture that i took in the trip.
</pre>
|
s300163929 | p00017 | Wrong Answer | #encoding=utf-8
ans = ""
def inp(i):
split_word = i.split()
return split_word
def rot(split_word):
for i in xrange(len(split_word)):
tako = ""
if len(split_word[i]) == 4 or len(split_word[i]) == 3:
num = ord(split_word[i][0]) - ord("t")
for j in xrange(len(split_word[i])):
tako += chr(ord(split_word[i][j]) - num)
if tako == "that" or tako == "the" or tako == "this":
return proce(split_word, num)
else:
pass
num = 0
def proce(split_word, num):
ans = ""
for i in xrange(len(split_word)):
for j in xrange(len(split_word[i])):
if split_word[i][j] == ".":
ans += split_word[i][j]
return ans
else:
ans += str(chr(ord(split_word[i][j]) - num))
ans += " "
return ans
if __name__ == "__main__":
import sys
for i in sys.stdin:
word = inp(i)
print rot(word) | xlmw mw xli tmgxyvi xlex m xsso mr xli xvmt.
| this is the picture that i took in the trip.
|
<H1>Caesar Cipher</H1>
<p>
In cryptography, Caesar cipher is one of the simplest and most widely known encryption method. Caesar cipher is a type of substitution cipher in which each letter in the text is replaced by a letter some fixed number of positions down the alphabet. For example, with a shift of 1, 'a' would be replaced by 'b', 'b' would become 'c', 'y' would become 'z', 'z' would become 'a', and so on. In that case, a text:
<pre>
this is a pen
</pre>
<p>
is would become:
</p>
<pre>
uijt jt b qfo
</pre>
<p>
Write a program which reads a text encrypted by Caesar Chipher and prints the corresponding decoded text. The number of shift is secret and it depends on datasets, but you can assume that the decoded text includes any of the following words: "the", "this", or "that".
</p>
<H2>Input</H2>
<p>
Input consists of several datasets. Each dataset consists of texts in a line. Input ends with EOF. The text consists of lower-case letters, periods, space, and end-of-lines. Only the letters have been encrypted. A line consists of at most 80 characters.
</p>
<p>
You may assume that you can create one decoded text which includes any of "the", "this", or "that" from the given input text.
</p>
<p>
The number of datasets is less than or equal to 20.
</p>
<H2>Output</H2>
<p>
Print decoded texts in a line.
</p>
<H2>Sample Input</H2>
<pre>
xlmw mw xli tmgxyvi xlex m xsso mr xli xvmt.
</pre>
<H2>Output for the Sample Input</H2>
<pre>
this is the picture that i took in the trip.
</pre>
|
s616733951 | p00017 | Wrong Answer | #encoding=utf-8
def inp(i):
split_word = i.split()
return split_word
def rot(split_word):
for i in xrange(len(split_word)):
tako = ""
if len(split_word[i]) == 4 or len(split_word[i]) == 3:
num = ord(split_word[i][0]) - ord("t")
for j in xrange(len(split_word[i])):
tako += chr(ord(split_word[i][j]) - num)
if tako == "that" or tako == "the" or tako == "this":
return proce(split_word, num)
else:
pass
num = 0
def proce(split_word, num):
ans = ""
for i in xrange(len(split_word)):
for j in xrange(len(split_word[i])):
if split_word[i][j] < ord("a") or ord("z") < split_word[i][j]:
ans += split_word[i][j]
else:
ans += str(chr(ord(split_word[i][j]) - num))
ans += " "
return ans
if __name__ == "__main__":
import sys
for i in sys.stdin:
word = inp(i)
print rot(word) | xlmw mw xli tmgxyvi xlex m xsso mr xli xvmt.
| this is the picture that i took in the trip.
|
<H1>Caesar Cipher</H1>
<p>
In cryptography, Caesar cipher is one of the simplest and most widely known encryption method. Caesar cipher is a type of substitution cipher in which each letter in the text is replaced by a letter some fixed number of positions down the alphabet. For example, with a shift of 1, 'a' would be replaced by 'b', 'b' would become 'c', 'y' would become 'z', 'z' would become 'a', and so on. In that case, a text:
<pre>
this is a pen
</pre>
<p>
is would become:
</p>
<pre>
uijt jt b qfo
</pre>
<p>
Write a program which reads a text encrypted by Caesar Chipher and prints the corresponding decoded text. The number of shift is secret and it depends on datasets, but you can assume that the decoded text includes any of the following words: "the", "this", or "that".
</p>
<H2>Input</H2>
<p>
Input consists of several datasets. Each dataset consists of texts in a line. Input ends with EOF. The text consists of lower-case letters, periods, space, and end-of-lines. Only the letters have been encrypted. A line consists of at most 80 characters.
</p>
<p>
You may assume that you can create one decoded text which includes any of "the", "this", or "that" from the given input text.
</p>
<p>
The number of datasets is less than or equal to 20.
</p>
<H2>Output</H2>
<p>
Print decoded texts in a line.
</p>
<H2>Sample Input</H2>
<pre>
xlmw mw xli tmgxyvi xlex m xsso mr xli xvmt.
</pre>
<H2>Output for the Sample Input</H2>
<pre>
this is the picture that i took in the trip.
</pre>
|
s421381229 | p00017 | Wrong Answer | # -*- coding: utf-8 -*-
import sys
import codecs
for line in sys.stdin:
k = ord(line[0])-ord('t')
ans = ""
for i in range(len(line)):
a = ord(line[i])
if ord('a') <= a <= ord('z'):
if a-k >= ord('a'):
ans = ans + chr(a-k)
else:
ans = ans + chr(a-k+26)
else:
ans = ans + line[i]
print ans | xlmw mw xli tmgxyvi xlex m xsso mr xli xvmt.
| this is the picture that i took in the trip.
|
<H1>Caesar Cipher</H1>
<p>
In cryptography, Caesar cipher is one of the simplest and most widely known encryption method. Caesar cipher is a type of substitution cipher in which each letter in the text is replaced by a letter some fixed number of positions down the alphabet. For example, with a shift of 1, 'a' would be replaced by 'b', 'b' would become 'c', 'y' would become 'z', 'z' would become 'a', and so on. In that case, a text:
<pre>
this is a pen
</pre>
<p>
is would become:
</p>
<pre>
uijt jt b qfo
</pre>
<p>
Write a program which reads a text encrypted by Caesar Chipher and prints the corresponding decoded text. The number of shift is secret and it depends on datasets, but you can assume that the decoded text includes any of the following words: "the", "this", or "that".
</p>
<H2>Input</H2>
<p>
Input consists of several datasets. Each dataset consists of texts in a line. Input ends with EOF. The text consists of lower-case letters, periods, space, and end-of-lines. Only the letters have been encrypted. A line consists of at most 80 characters.
</p>
<p>
You may assume that you can create one decoded text which includes any of "the", "this", or "that" from the given input text.
</p>
<p>
The number of datasets is less than or equal to 20.
</p>
<H2>Output</H2>
<p>
Print decoded texts in a line.
</p>
<H2>Sample Input</H2>
<pre>
xlmw mw xli tmgxyvi xlex m xsso mr xli xvmt.
</pre>
<H2>Output for the Sample Input</H2>
<pre>
this is the picture that i took in the trip.
</pre>
|
s962353232 | p00017 | Wrong Answer | # -*- coding: utf-8 -*-
import sys
import codecs
for line in sys.stdin:
for i in range(1, 26):
ans = ""
for j in range(len(line)):
a = ord(line[j])
if ord('a') <= a <= ord('z'):
if a-i >= ord('a'):
ans = ans + chr(a-i)
else:
ans = ans + chr(a-i+26)
else:
ans = ans + line[j]
print ans
if "the" in ans or "this" in ans or "that" in ans:
break
print ans | xlmw mw xli tmgxyvi xlex m xsso mr xli xvmt.
| this is the picture that i took in the trip.
|
<H1>Caesar Cipher</H1>
<p>
In cryptography, Caesar cipher is one of the simplest and most widely known encryption method. Caesar cipher is a type of substitution cipher in which each letter in the text is replaced by a letter some fixed number of positions down the alphabet. For example, with a shift of 1, 'a' would be replaced by 'b', 'b' would become 'c', 'y' would become 'z', 'z' would become 'a', and so on. In that case, a text:
<pre>
this is a pen
</pre>
<p>
is would become:
</p>
<pre>
uijt jt b qfo
</pre>
<p>
Write a program which reads a text encrypted by Caesar Chipher and prints the corresponding decoded text. The number of shift is secret and it depends on datasets, but you can assume that the decoded text includes any of the following words: "the", "this", or "that".
</p>
<H2>Input</H2>
<p>
Input consists of several datasets. Each dataset consists of texts in a line. Input ends with EOF. The text consists of lower-case letters, periods, space, and end-of-lines. Only the letters have been encrypted. A line consists of at most 80 characters.
</p>
<p>
You may assume that you can create one decoded text which includes any of "the", "this", or "that" from the given input text.
</p>
<p>
The number of datasets is less than or equal to 20.
</p>
<H2>Output</H2>
<p>
Print decoded texts in a line.
</p>
<H2>Sample Input</H2>
<pre>
xlmw mw xli tmgxyvi xlex m xsso mr xli xvmt.
</pre>
<H2>Output for the Sample Input</H2>
<pre>
this is the picture that i took in the trip.
</pre>
|
s674540847 | p00017 | Wrong Answer | # -*- coding: utf-8 -*-
import sys
import codecs
for line in sys.stdin:
for i in range(1, 26):
ans = ""
for j in range(len(line)):
a = ord(line[j])
if ord('a') <= a <= ord('z'):
if a-i >= ord('a'):
ans = ans + chr(a-i)
else:
ans = ans + chr(a-i+26)
else:
ans = ans + line[j]
if "the" in ans or "this" in ans or "that" in ans:
break
sys.stdout.write(ans) | xlmw mw xli tmgxyvi xlex m xsso mr xli xvmt.
| this is the picture that i took in the trip.
|
<H1>Caesar Cipher</H1>
<p>
In cryptography, Caesar cipher is one of the simplest and most widely known encryption method. Caesar cipher is a type of substitution cipher in which each letter in the text is replaced by a letter some fixed number of positions down the alphabet. For example, with a shift of 1, 'a' would be replaced by 'b', 'b' would become 'c', 'y' would become 'z', 'z' would become 'a', and so on. In that case, a text:
<pre>
this is a pen
</pre>
<p>
is would become:
</p>
<pre>
uijt jt b qfo
</pre>
<p>
Write a program which reads a text encrypted by Caesar Chipher and prints the corresponding decoded text. The number of shift is secret and it depends on datasets, but you can assume that the decoded text includes any of the following words: "the", "this", or "that".
</p>
<H2>Input</H2>
<p>
Input consists of several datasets. Each dataset consists of texts in a line. Input ends with EOF. The text consists of lower-case letters, periods, space, and end-of-lines. Only the letters have been encrypted. A line consists of at most 80 characters.
</p>
<p>
You may assume that you can create one decoded text which includes any of "the", "this", or "that" from the given input text.
</p>
<p>
The number of datasets is less than or equal to 20.
</p>
<H2>Output</H2>
<p>
Print decoded texts in a line.
</p>
<H2>Sample Input</H2>
<pre>
xlmw mw xli tmgxyvi xlex m xsso mr xli xvmt.
</pre>
<H2>Output for the Sample Input</H2>
<pre>
this is the picture that i took in the trip.
</pre>
|
s187571326 | p00017 | Wrong Answer | s = input()[:-1].split()
while True:
for i in range(26):
li = []
for word in s:
t = ""
for c in word:
t += chr( (ord(c) - ord('a') + i) % 26 + ord('a') )
li.append(t)
if 'this' in li or 'that' in li or 'the' in li:
print(" ".join(li) + '.')
exit() | xlmw mw xli tmgxyvi xlex m xsso mr xli xvmt.
| this is the picture that i took in the trip.
|
<H1>Caesar Cipher</H1>
<p>
In cryptography, Caesar cipher is one of the simplest and most widely known encryption method. Caesar cipher is a type of substitution cipher in which each letter in the text is replaced by a letter some fixed number of positions down the alphabet. For example, with a shift of 1, 'a' would be replaced by 'b', 'b' would become 'c', 'y' would become 'z', 'z' would become 'a', and so on. In that case, a text:
<pre>
this is a pen
</pre>
<p>
is would become:
</p>
<pre>
uijt jt b qfo
</pre>
<p>
Write a program which reads a text encrypted by Caesar Chipher and prints the corresponding decoded text. The number of shift is secret and it depends on datasets, but you can assume that the decoded text includes any of the following words: "the", "this", or "that".
</p>
<H2>Input</H2>
<p>
Input consists of several datasets. Each dataset consists of texts in a line. Input ends with EOF. The text consists of lower-case letters, periods, space, and end-of-lines. Only the letters have been encrypted. A line consists of at most 80 characters.
</p>
<p>
You may assume that you can create one decoded text which includes any of "the", "this", or "that" from the given input text.
</p>
<p>
The number of datasets is less than or equal to 20.
</p>
<H2>Output</H2>
<p>
Print decoded texts in a line.
</p>
<H2>Sample Input</H2>
<pre>
xlmw mw xli tmgxyvi xlex m xsso mr xli xvmt.
</pre>
<H2>Output for the Sample Input</H2>
<pre>
this is the picture that i took in the trip.
</pre>
|
s361700280 | p00017 | Wrong Answer | s = input()[:-1].split()
D = 0
for word in s:
if len(word) == 3:
diff = []
for c, d in zip(word, 'the'):
diff.append(ord(c) - ord(d))
if diff.count(diff[0]) == 3:
D = diff[0]
break
if len(word) == 4:
diff = []
for c, d in zip(word, 'that'):
diff.append(ord(c) - ord(d))
if diff.count(diff[0]) == 4:
D = diff[0]
break
diff = list([])
for c, d in zip(word, 'this'):
diff.append(ord(c) - ord(d))
if diff.count(diff[0]) == 4:
D = diff[0]
break
print(D)
li = []
for word in s:
t = ""
for c in word:
t += chr( (ord(c) - ord('a') + 26 - D) % 26 + ord('a') )
li.append(t)
print(" ".join(li) + '.') | xlmw mw xli tmgxyvi xlex m xsso mr xli xvmt.
| this is the picture that i took in the trip.
|
<H1>Caesar Cipher</H1>
<p>
In cryptography, Caesar cipher is one of the simplest and most widely known encryption method. Caesar cipher is a type of substitution cipher in which each letter in the text is replaced by a letter some fixed number of positions down the alphabet. For example, with a shift of 1, 'a' would be replaced by 'b', 'b' would become 'c', 'y' would become 'z', 'z' would become 'a', and so on. In that case, a text:
<pre>
this is a pen
</pre>
<p>
is would become:
</p>
<pre>
uijt jt b qfo
</pre>
<p>
Write a program which reads a text encrypted by Caesar Chipher and prints the corresponding decoded text. The number of shift is secret and it depends on datasets, but you can assume that the decoded text includes any of the following words: "the", "this", or "that".
</p>
<H2>Input</H2>
<p>
Input consists of several datasets. Each dataset consists of texts in a line. Input ends with EOF. The text consists of lower-case letters, periods, space, and end-of-lines. Only the letters have been encrypted. A line consists of at most 80 characters.
</p>
<p>
You may assume that you can create one decoded text which includes any of "the", "this", or "that" from the given input text.
</p>
<p>
The number of datasets is less than or equal to 20.
</p>
<H2>Output</H2>
<p>
Print decoded texts in a line.
</p>
<H2>Sample Input</H2>
<pre>
xlmw mw xli tmgxyvi xlex m xsso mr xli xvmt.
</pre>
<H2>Output for the Sample Input</H2>
<pre>
this is the picture that i took in the trip.
</pre>
|
s005748694 | p00017 | Wrong Answer | while True:
try:
s = input()[:-1].split()
except:
exit()
D = 0
for word in s:
if len(word) == 3:
diff = []
for c, d in zip(word, 'the'):
diff.append(ord(c) - ord(d))
if diff.count(diff[0]) == 3:
D = diff[0]
break
if len(word) == 4:
diff = []
for c, d in zip(word, 'that'):
diff.append(ord(c) - ord(d))
if diff.count(diff[0]) == 4:
D = diff[0]
break
diff = list([])
for c, d in zip(word, 'this'):
diff.append(ord(c) - ord(d))
if diff.count(diff[0]) == 4:
D = diff[0]
break
print(D)
li = []
for word in s:
t = ""
for c in word:
t += chr( (ord(c) - ord('a') + 26 - D) % 26 + ord('a') )
li.append(t)
print(" ".join(li) + '.') | xlmw mw xli tmgxyvi xlex m xsso mr xli xvmt.
| this is the picture that i took in the trip.
|
<H1>Caesar Cipher</H1>
<p>
In cryptography, Caesar cipher is one of the simplest and most widely known encryption method. Caesar cipher is a type of substitution cipher in which each letter in the text is replaced by a letter some fixed number of positions down the alphabet. For example, with a shift of 1, 'a' would be replaced by 'b', 'b' would become 'c', 'y' would become 'z', 'z' would become 'a', and so on. In that case, a text:
<pre>
this is a pen
</pre>
<p>
is would become:
</p>
<pre>
uijt jt b qfo
</pre>
<p>
Write a program which reads a text encrypted by Caesar Chipher and prints the corresponding decoded text. The number of shift is secret and it depends on datasets, but you can assume that the decoded text includes any of the following words: "the", "this", or "that".
</p>
<H2>Input</H2>
<p>
Input consists of several datasets. Each dataset consists of texts in a line. Input ends with EOF. The text consists of lower-case letters, periods, space, and end-of-lines. Only the letters have been encrypted. A line consists of at most 80 characters.
</p>
<p>
You may assume that you can create one decoded text which includes any of "the", "this", or "that" from the given input text.
</p>
<p>
The number of datasets is less than or equal to 20.
</p>
<H2>Output</H2>
<p>
Print decoded texts in a line.
</p>
<H2>Sample Input</H2>
<pre>
xlmw mw xli tmgxyvi xlex m xsso mr xli xvmt.
</pre>
<H2>Output for the Sample Input</H2>
<pre>
this is the picture that i took in the trip.
</pre>
|
s098506721 | p00017 | Wrong Answer | while True:
try:
s = input()
except:
exit()
s = s[:-1].split()
D = 0
for word in s:
if len(word) == 3:
diff = []
for c, d in zip(word, 'the'):
diff.append(ord(c) - ord(d))
if diff.count(diff[0]) == 3:
D = diff[0]
break
if len(word) == 4:
diff = []
for c, d in zip(word, 'that'):
diff.append(ord(c) - ord(d))
if diff.count(diff[0]) == 4:
D = diff[0]
break
diff = list([])
for c, d in zip(word, 'this'):
diff.append(ord(c) - ord(d))
if diff.count(diff[0]) == 4:
D = diff[0]
break
print(D)
li = []
for word in s:
t = ""
for c in word:
t += chr( (ord(c) - ord('a') + 26 - D) % 26 + ord('a') )
li.append(t)
print(" ".join(li) + '.') | xlmw mw xli tmgxyvi xlex m xsso mr xli xvmt.
| this is the picture that i took in the trip.
|
<H1>Caesar Cipher</H1>
<p>
In cryptography, Caesar cipher is one of the simplest and most widely known encryption method. Caesar cipher is a type of substitution cipher in which each letter in the text is replaced by a letter some fixed number of positions down the alphabet. For example, with a shift of 1, 'a' would be replaced by 'b', 'b' would become 'c', 'y' would become 'z', 'z' would become 'a', and so on. In that case, a text:
<pre>
this is a pen
</pre>
<p>
is would become:
</p>
<pre>
uijt jt b qfo
</pre>
<p>
Write a program which reads a text encrypted by Caesar Chipher and prints the corresponding decoded text. The number of shift is secret and it depends on datasets, but you can assume that the decoded text includes any of the following words: "the", "this", or "that".
</p>
<H2>Input</H2>
<p>
Input consists of several datasets. Each dataset consists of texts in a line. Input ends with EOF. The text consists of lower-case letters, periods, space, and end-of-lines. Only the letters have been encrypted. A line consists of at most 80 characters.
</p>
<p>
You may assume that you can create one decoded text which includes any of "the", "this", or "that" from the given input text.
</p>
<p>
The number of datasets is less than or equal to 20.
</p>
<H2>Output</H2>
<p>
Print decoded texts in a line.
</p>
<H2>Sample Input</H2>
<pre>
xlmw mw xli tmgxyvi xlex m xsso mr xli xvmt.
</pre>
<H2>Output for the Sample Input</H2>
<pre>
this is the picture that i took in the trip.
</pre>
|
s010379660 | p00017 | Wrong Answer | def func(s):
while True:
for i in range(26):
li = []
for word in s:
t = ""
for c in word:
t += chr( (ord(c) - ord('a') + i) % 26 + ord('a') )
print(t)
li.append(t)
if 'this' in li or 'that' in li or 'the' in li:
print(" ".join(li) + '.')
return
while True:
try:
s = input()
except:
exit()
s = s[:-1].split()
func(s) | xlmw mw xli tmgxyvi xlex m xsso mr xli xvmt.
| this is the picture that i took in the trip.
|
<H1>Caesar Cipher</H1>
<p>
In cryptography, Caesar cipher is one of the simplest and most widely known encryption method. Caesar cipher is a type of substitution cipher in which each letter in the text is replaced by a letter some fixed number of positions down the alphabet. For example, with a shift of 1, 'a' would be replaced by 'b', 'b' would become 'c', 'y' would become 'z', 'z' would become 'a', and so on. In that case, a text:
<pre>
this is a pen
</pre>
<p>
is would become:
</p>
<pre>
uijt jt b qfo
</pre>
<p>
Write a program which reads a text encrypted by Caesar Chipher and prints the corresponding decoded text. The number of shift is secret and it depends on datasets, but you can assume that the decoded text includes any of the following words: "the", "this", or "that".
</p>
<H2>Input</H2>
<p>
Input consists of several datasets. Each dataset consists of texts in a line. Input ends with EOF. The text consists of lower-case letters, periods, space, and end-of-lines. Only the letters have been encrypted. A line consists of at most 80 characters.
</p>
<p>
You may assume that you can create one decoded text which includes any of "the", "this", or "that" from the given input text.
</p>
<p>
The number of datasets is less than or equal to 20.
</p>
<H2>Output</H2>
<p>
Print decoded texts in a line.
</p>
<H2>Sample Input</H2>
<pre>
xlmw mw xli tmgxyvi xlex m xsso mr xli xvmt.
</pre>
<H2>Output for the Sample Input</H2>
<pre>
this is the picture that i took in the trip.
</pre>
|
s527379646 | p00017 | Wrong Answer | while 1:
try:
n=float('inf')
s=raw_input().strip('.').split()
for i in xrange(26):
for j in s:
r1=[]
r2=[]
for k in j:
r1.append(chr(ord(k)+i))
r2.append(chr(ord(k)-i))
if "".join(r1)=="this" or "".join(r1)=="that" or "".join(r1)=="the":
n=i
if "".join(r2)=="this" or "".join(r2)=="that" or "".join(r2)=="the":
n=-i
if n!=float('inf'):
break
ans=[]
for i in s:
splitans=[]
for j in i:
splitans.append(chr(ord(j)+n))
ans.append(''.join(splitans))
print(' '.join(ans)+'.')
except:
break | xlmw mw xli tmgxyvi xlex m xsso mr xli xvmt.
| this is the picture that i took in the trip.
|
<H1>Caesar Cipher</H1>
<p>
In cryptography, Caesar cipher is one of the simplest and most widely known encryption method. Caesar cipher is a type of substitution cipher in which each letter in the text is replaced by a letter some fixed number of positions down the alphabet. For example, with a shift of 1, 'a' would be replaced by 'b', 'b' would become 'c', 'y' would become 'z', 'z' would become 'a', and so on. In that case, a text:
<pre>
this is a pen
</pre>
<p>
is would become:
</p>
<pre>
uijt jt b qfo
</pre>
<p>
Write a program which reads a text encrypted by Caesar Chipher and prints the corresponding decoded text. The number of shift is secret and it depends on datasets, but you can assume that the decoded text includes any of the following words: "the", "this", or "that".
</p>
<H2>Input</H2>
<p>
Input consists of several datasets. Each dataset consists of texts in a line. Input ends with EOF. The text consists of lower-case letters, periods, space, and end-of-lines. Only the letters have been encrypted. A line consists of at most 80 characters.
</p>
<p>
You may assume that you can create one decoded text which includes any of "the", "this", or "that" from the given input text.
</p>
<p>
The number of datasets is less than or equal to 20.
</p>
<H2>Output</H2>
<p>
Print decoded texts in a line.
</p>
<H2>Sample Input</H2>
<pre>
xlmw mw xli tmgxyvi xlex m xsso mr xli xvmt.
</pre>
<H2>Output for the Sample Input</H2>
<pre>
this is the picture that i took in the trip.
</pre>
|
s807212206 | p00017 | Wrong Answer | while 1:
try:
n=float('inf')
s=raw_input().strip('.').split()
for i in xrange(26):
for j in s:
r=[]
for k in j:
r.append(chr(97+((ord(k)+i)/123)*(ord(k)+i-122)))
if "".join(r)=="this" or "".join(r)=="that" or "".join(r)=="the":
n=i
if n!=float('inf'):
break
ans=[]
for i in s:
splitans=[]
for j in i:
splitans.append(chr(97+((ord(j)+n)/123)*(ord(j)+n-122)))
ans.append(''.join(splitans))
print(' '.join(ans)+'.')
except:
break | xlmw mw xli tmgxyvi xlex m xsso mr xli xvmt.
| this is the picture that i took in the trip.
|
<H1>Caesar Cipher</H1>
<p>
In cryptography, Caesar cipher is one of the simplest and most widely known encryption method. Caesar cipher is a type of substitution cipher in which each letter in the text is replaced by a letter some fixed number of positions down the alphabet. For example, with a shift of 1, 'a' would be replaced by 'b', 'b' would become 'c', 'y' would become 'z', 'z' would become 'a', and so on. In that case, a text:
<pre>
this is a pen
</pre>
<p>
is would become:
</p>
<pre>
uijt jt b qfo
</pre>
<p>
Write a program which reads a text encrypted by Caesar Chipher and prints the corresponding decoded text. The number of shift is secret and it depends on datasets, but you can assume that the decoded text includes any of the following words: "the", "this", or "that".
</p>
<H2>Input</H2>
<p>
Input consists of several datasets. Each dataset consists of texts in a line. Input ends with EOF. The text consists of lower-case letters, periods, space, and end-of-lines. Only the letters have been encrypted. A line consists of at most 80 characters.
</p>
<p>
You may assume that you can create one decoded text which includes any of "the", "this", or "that" from the given input text.
</p>
<p>
The number of datasets is less than or equal to 20.
</p>
<H2>Output</H2>
<p>
Print decoded texts in a line.
</p>
<H2>Sample Input</H2>
<pre>
xlmw mw xli tmgxyvi xlex m xsso mr xli xvmt.
</pre>
<H2>Output for the Sample Input</H2>
<pre>
this is the picture that i took in the trip.
</pre>
|
s366485777 | p00017 | Wrong Answer | while 1:
try:
n=float('inf')
s=raw_input().strip('.').split()
for i in xrange(26):
for j in s:
r=[]
for k in j:
if ord(k)+i<123:
r.append(chr(ord(k)+i))
else:
r.append(chr(97+ord(k)+i-123))
if "".join(r)=="this" or "".join(r)=="that" or "".join(r)=="the":
n=i
if n!=float('inf'):
break
ans=[]
for i in s:
splitans=[]
for j in i:
if ord(j)+n<123:
splitans.append(chr(ord(j)+n))
else:
splitans.append(chr(97+ord(j)+n-123))
ans.append(''.join(splitans))
print(' '.join(ans)+'.')
except:
break | xlmw mw xli tmgxyvi xlex m xsso mr xli xvmt.
| this is the picture that i took in the trip.
|
<H1>Caesar Cipher</H1>
<p>
In cryptography, Caesar cipher is one of the simplest and most widely known encryption method. Caesar cipher is a type of substitution cipher in which each letter in the text is replaced by a letter some fixed number of positions down the alphabet. For example, with a shift of 1, 'a' would be replaced by 'b', 'b' would become 'c', 'y' would become 'z', 'z' would become 'a', and so on. In that case, a text:
<pre>
this is a pen
</pre>
<p>
is would become:
</p>
<pre>
uijt jt b qfo
</pre>
<p>
Write a program which reads a text encrypted by Caesar Chipher and prints the corresponding decoded text. The number of shift is secret and it depends on datasets, but you can assume that the decoded text includes any of the following words: "the", "this", or "that".
</p>
<H2>Input</H2>
<p>
Input consists of several datasets. Each dataset consists of texts in a line. Input ends with EOF. The text consists of lower-case letters, periods, space, and end-of-lines. Only the letters have been encrypted. A line consists of at most 80 characters.
</p>
<p>
You may assume that you can create one decoded text which includes any of "the", "this", or "that" from the given input text.
</p>
<p>
The number of datasets is less than or equal to 20.
</p>
<H2>Output</H2>
<p>
Print decoded texts in a line.
</p>
<H2>Sample Input</H2>
<pre>
xlmw mw xli tmgxyvi xlex m xsso mr xli xvmt.
</pre>
<H2>Output for the Sample Input</H2>
<pre>
this is the picture that i took in the trip.
</pre>
|
s937231077 | p00017 | Wrong Answer | # coding: utf-8
def casar(s, n):
d = {}
for c in (65, 97):
for i in range(26):
d[chr(i+c)] = chr((i+n) % 26 + c)
return "".join([d.get(c, c) for c in s])
encrypttxt = raw_input()
for i in range(26):
if "the" in casar(encrypttxt, i) or "this" in casar(encrypttxt, i) or "that" in casar(encrypttxt, i):
print casar(encrypttxt, i) | xlmw mw xli tmgxyvi xlex m xsso mr xli xvmt.
| this is the picture that i took in the trip.
|
<H1>Caesar Cipher</H1>
<p>
In cryptography, Caesar cipher is one of the simplest and most widely known encryption method. Caesar cipher is a type of substitution cipher in which each letter in the text is replaced by a letter some fixed number of positions down the alphabet. For example, with a shift of 1, 'a' would be replaced by 'b', 'b' would become 'c', 'y' would become 'z', 'z' would become 'a', and so on. In that case, a text:
<pre>
this is a pen
</pre>
<p>
is would become:
</p>
<pre>
uijt jt b qfo
</pre>
<p>
Write a program which reads a text encrypted by Caesar Chipher and prints the corresponding decoded text. The number of shift is secret and it depends on datasets, but you can assume that the decoded text includes any of the following words: "the", "this", or "that".
</p>
<H2>Input</H2>
<p>
Input consists of several datasets. Each dataset consists of texts in a line. Input ends with EOF. The text consists of lower-case letters, periods, space, and end-of-lines. Only the letters have been encrypted. A line consists of at most 80 characters.
</p>
<p>
You may assume that you can create one decoded text which includes any of "the", "this", or "that" from the given input text.
</p>
<p>
The number of datasets is less than or equal to 20.
</p>
<H2>Output</H2>
<p>
Print decoded texts in a line.
</p>
<H2>Sample Input</H2>
<pre>
xlmw mw xli tmgxyvi xlex m xsso mr xli xvmt.
</pre>
<H2>Output for the Sample Input</H2>
<pre>
this is the picture that i took in the trip.
</pre>
|
s683251326 | p00017 | Wrong Answer | # coding: utf-8
def casar(s, n):
d = {}
for c in (65, 97):
for i in range(26):
d[chr(i+c)] = chr((i+n) % 26 + c)
return "".join([d.get(c, c) for c in s])
encrypttxt = raw_input()
for i in range(26):
t = casar(encrypttxt, i)
if "the" in t or "this" in t or "that" in t:
print t | xlmw mw xli tmgxyvi xlex m xsso mr xli xvmt.
| this is the picture that i took in the trip.
|
<H1>Caesar Cipher</H1>
<p>
In cryptography, Caesar cipher is one of the simplest and most widely known encryption method. Caesar cipher is a type of substitution cipher in which each letter in the text is replaced by a letter some fixed number of positions down the alphabet. For example, with a shift of 1, 'a' would be replaced by 'b', 'b' would become 'c', 'y' would become 'z', 'z' would become 'a', and so on. In that case, a text:
<pre>
this is a pen
</pre>
<p>
is would become:
</p>
<pre>
uijt jt b qfo
</pre>
<p>
Write a program which reads a text encrypted by Caesar Chipher and prints the corresponding decoded text. The number of shift is secret and it depends on datasets, but you can assume that the decoded text includes any of the following words: "the", "this", or "that".
</p>
<H2>Input</H2>
<p>
Input consists of several datasets. Each dataset consists of texts in a line. Input ends with EOF. The text consists of lower-case letters, periods, space, and end-of-lines. Only the letters have been encrypted. A line consists of at most 80 characters.
</p>
<p>
You may assume that you can create one decoded text which includes any of "the", "this", or "that" from the given input text.
</p>
<p>
The number of datasets is less than or equal to 20.
</p>
<H2>Output</H2>
<p>
Print decoded texts in a line.
</p>
<H2>Sample Input</H2>
<pre>
xlmw mw xli tmgxyvi xlex m xsso mr xli xvmt.
</pre>
<H2>Output for the Sample Input</H2>
<pre>
this is the picture that i took in the trip.
</pre>
|
s432832587 | p00017 | Wrong Answer | def casar(s, n):
d = {}
for c in (65, 97):
for i in range(26):
d[chr(i+c)] = chr((i+n) % 26 + c)
return "".join([d.get(c, c) for c in s])
encrypttxt = raw_input()
for i in range(26):
t = casar(encrypttxt, i)
if "the" in t or "this" in t or "that" in t:
print t | xlmw mw xli tmgxyvi xlex m xsso mr xli xvmt.
| this is the picture that i took in the trip.
|
<H1>Caesar Cipher</H1>
<p>
In cryptography, Caesar cipher is one of the simplest and most widely known encryption method. Caesar cipher is a type of substitution cipher in which each letter in the text is replaced by a letter some fixed number of positions down the alphabet. For example, with a shift of 1, 'a' would be replaced by 'b', 'b' would become 'c', 'y' would become 'z', 'z' would become 'a', and so on. In that case, a text:
<pre>
this is a pen
</pre>
<p>
is would become:
</p>
<pre>
uijt jt b qfo
</pre>
<p>
Write a program which reads a text encrypted by Caesar Chipher and prints the corresponding decoded text. The number of shift is secret and it depends on datasets, but you can assume that the decoded text includes any of the following words: "the", "this", or "that".
</p>
<H2>Input</H2>
<p>
Input consists of several datasets. Each dataset consists of texts in a line. Input ends with EOF. The text consists of lower-case letters, periods, space, and end-of-lines. Only the letters have been encrypted. A line consists of at most 80 characters.
</p>
<p>
You may assume that you can create one decoded text which includes any of "the", "this", or "that" from the given input text.
</p>
<p>
The number of datasets is less than or equal to 20.
</p>
<H2>Output</H2>
<p>
Print decoded texts in a line.
</p>
<H2>Sample Input</H2>
<pre>
xlmw mw xli tmgxyvi xlex m xsso mr xli xvmt.
</pre>
<H2>Output for the Sample Input</H2>
<pre>
this is the picture that i took in the trip.
</pre>
|
s893899725 | p00017 | Wrong Answer | import string
def caeser(str,n):
newstringa=""
newstringb=""
for c in str:
if c in string.ascii_lowercase:
i=string.ascii_lowercase.index(c)
cc=(string.ascii_lowercase*2)[i+n]
newstringa+=cc
newstringb+=cc
else:
newstringa+=' '
newstringb+=c
return (newstringa,newstringb)
input=raw_input()
for n in range(1,26):
[a,b]=caeser(input,n)
cand=a.split(' ')
ans=0
for w in ['the','this','that']:
if w in cand:
ans=1
if ans:
print b
break | xlmw mw xli tmgxyvi xlex m xsso mr xli xvmt.
| this is the picture that i took in the trip.
|
<H1>Caesar Cipher</H1>
<p>
In cryptography, Caesar cipher is one of the simplest and most widely known encryption method. Caesar cipher is a type of substitution cipher in which each letter in the text is replaced by a letter some fixed number of positions down the alphabet. For example, with a shift of 1, 'a' would be replaced by 'b', 'b' would become 'c', 'y' would become 'z', 'z' would become 'a', and so on. In that case, a text:
<pre>
this is a pen
</pre>
<p>
is would become:
</p>
<pre>
uijt jt b qfo
</pre>
<p>
Write a program which reads a text encrypted by Caesar Chipher and prints the corresponding decoded text. The number of shift is secret and it depends on datasets, but you can assume that the decoded text includes any of the following words: "the", "this", or "that".
</p>
<H2>Input</H2>
<p>
Input consists of several datasets. Each dataset consists of texts in a line. Input ends with EOF. The text consists of lower-case letters, periods, space, and end-of-lines. Only the letters have been encrypted. A line consists of at most 80 characters.
</p>
<p>
You may assume that you can create one decoded text which includes any of "the", "this", or "that" from the given input text.
</p>
<p>
The number of datasets is less than or equal to 20.
</p>
<H2>Output</H2>
<p>
Print decoded texts in a line.
</p>
<H2>Sample Input</H2>
<pre>
xlmw mw xli tmgxyvi xlex m xsso mr xli xvmt.
</pre>
<H2>Output for the Sample Input</H2>
<pre>
this is the picture that i took in the trip.
</pre>
|
s620133342 | p00017 | Wrong Answer | import string
def caeser(str,n):
newstringa=""
newstringb=""
for c in str:
if c in string.ascii_lowercase:
i=string.ascii_lowercase.index(c)
cc=(string.ascii_lowercase*2)[i+n]
newstringa+=cc
newstringb+=cc
else:
newstringa+=' '
newstringb+=c
return (newstringa,newstringb)
while(1):
try:
input=raw_input()
for n in range(1,26):
[a,b]=caeser(input,n)
cand=a.split(' ')
ans=0
for w in ['the','this','that']:
if w in cand:
ans=1
if ans:
print b
break
except:
break | xlmw mw xli tmgxyvi xlex m xsso mr xli xvmt.
| this is the picture that i took in the trip.
|
<H1>Caesar Cipher</H1>
<p>
In cryptography, Caesar cipher is one of the simplest and most widely known encryption method. Caesar cipher is a type of substitution cipher in which each letter in the text is replaced by a letter some fixed number of positions down the alphabet. For example, with a shift of 1, 'a' would be replaced by 'b', 'b' would become 'c', 'y' would become 'z', 'z' would become 'a', and so on. In that case, a text:
<pre>
this is a pen
</pre>
<p>
is would become:
</p>
<pre>
uijt jt b qfo
</pre>
<p>
Write a program which reads a text encrypted by Caesar Chipher and prints the corresponding decoded text. The number of shift is secret and it depends on datasets, but you can assume that the decoded text includes any of the following words: "the", "this", or "that".
</p>
<H2>Input</H2>
<p>
Input consists of several datasets. Each dataset consists of texts in a line. Input ends with EOF. The text consists of lower-case letters, periods, space, and end-of-lines. Only the letters have been encrypted. A line consists of at most 80 characters.
</p>
<p>
You may assume that you can create one decoded text which includes any of "the", "this", or "that" from the given input text.
</p>
<p>
The number of datasets is less than or equal to 20.
</p>
<H2>Output</H2>
<p>
Print decoded texts in a line.
</p>
<H2>Sample Input</H2>
<pre>
xlmw mw xli tmgxyvi xlex m xsso mr xli xvmt.
</pre>
<H2>Output for the Sample Input</H2>
<pre>
this is the picture that i took in the trip.
</pre>
|
s569696980 | p00017 | Wrong Answer | import string
def caeser(str,n):
newstringa=""
newstringb=""
for c in str:
if c in string.ascii_lowercase:
i=string.ascii_lowercase.index(c)
cc=(string.ascii_lowercase*2)[i+n]
newstringa+=cc
newstringb+=cc
else:
newstringa+=' '
newstringb+=c
return (newstringa,newstringb)
while(1):
try:
input=raw_input()
for n in range(1,26):
[a,b]=caeser(input,n)
cand=a.split(' ')
ans=0
for w in ['the','this','that']:
if w in cand:
ans=1
if w in b:
ans=1
if ans:
print b
break
except:
break | xlmw mw xli tmgxyvi xlex m xsso mr xli xvmt.
| this is the picture that i took in the trip.
|
<H1>Caesar Cipher</H1>
<p>
In cryptography, Caesar cipher is one of the simplest and most widely known encryption method. Caesar cipher is a type of substitution cipher in which each letter in the text is replaced by a letter some fixed number of positions down the alphabet. For example, with a shift of 1, 'a' would be replaced by 'b', 'b' would become 'c', 'y' would become 'z', 'z' would become 'a', and so on. In that case, a text:
<pre>
this is a pen
</pre>
<p>
is would become:
</p>
<pre>
uijt jt b qfo
</pre>
<p>
Write a program which reads a text encrypted by Caesar Chipher and prints the corresponding decoded text. The number of shift is secret and it depends on datasets, but you can assume that the decoded text includes any of the following words: "the", "this", or "that".
</p>
<H2>Input</H2>
<p>
Input consists of several datasets. Each dataset consists of texts in a line. Input ends with EOF. The text consists of lower-case letters, periods, space, and end-of-lines. Only the letters have been encrypted. A line consists of at most 80 characters.
</p>
<p>
You may assume that you can create one decoded text which includes any of "the", "this", or "that" from the given input text.
</p>
<p>
The number of datasets is less than or equal to 20.
</p>
<H2>Output</H2>
<p>
Print decoded texts in a line.
</p>
<H2>Sample Input</H2>
<pre>
xlmw mw xli tmgxyvi xlex m xsso mr xli xvmt.
</pre>
<H2>Output for the Sample Input</H2>
<pre>
this is the picture that i took in the trip.
</pre>
|
s208186615 | p00017 | Wrong Answer | import string
import sys
def caeser(str,n):
newstringa=""
newstringb=""
for c in str:
if c in string.ascii_lowercase:
i=string.ascii_lowercase.index(c)
cc=(string.ascii_lowercase*2)[i+n]
newstringa+=cc
newstringb+=cc
else:
newstringa+=' '
newstringb+=c
return (newstringa,newstringb)
input=sys.stdin.readline()
for n in range(1,26):
[a,b]=caeser(input,n)
cand=a.split(' ')
ans=0
for w in ['the','this','that']:
if w in cand:
ans=1
if ans:
print b
break | xlmw mw xli tmgxyvi xlex m xsso mr xli xvmt.
| this is the picture that i took in the trip.
|
<H1>Caesar Cipher</H1>
<p>
In cryptography, Caesar cipher is one of the simplest and most widely known encryption method. Caesar cipher is a type of substitution cipher in which each letter in the text is replaced by a letter some fixed number of positions down the alphabet. For example, with a shift of 1, 'a' would be replaced by 'b', 'b' would become 'c', 'y' would become 'z', 'z' would become 'a', and so on. In that case, a text:
<pre>
this is a pen
</pre>
<p>
is would become:
</p>
<pre>
uijt jt b qfo
</pre>
<p>
Write a program which reads a text encrypted by Caesar Chipher and prints the corresponding decoded text. The number of shift is secret and it depends on datasets, but you can assume that the decoded text includes any of the following words: "the", "this", or "that".
</p>
<H2>Input</H2>
<p>
Input consists of several datasets. Each dataset consists of texts in a line. Input ends with EOF. The text consists of lower-case letters, periods, space, and end-of-lines. Only the letters have been encrypted. A line consists of at most 80 characters.
</p>
<p>
You may assume that you can create one decoded text which includes any of "the", "this", or "that" from the given input text.
</p>
<p>
The number of datasets is less than or equal to 20.
</p>
<H2>Output</H2>
<p>
Print decoded texts in a line.
</p>
<H2>Sample Input</H2>
<pre>
xlmw mw xli tmgxyvi xlex m xsso mr xli xvmt.
</pre>
<H2>Output for the Sample Input</H2>
<pre>
this is the picture that i took in the trip.
</pre>
|
s052355839 | p00017 | Wrong Answer | import string
import sys
def caeser(str,n):
newstringa=""
newstringb=""
for c in str:
if c in string.ascii_lowercase:
i=string.ascii_lowercase.index(c)
cc=(string.ascii_lowercase*2)[i+n]
newstringa+=cc
newstringb+=cc
else:
newstringa+=' '
newstringb+=c
return (newstringa,newstringb)
input=sys.stdin.readline()
for n in range(1,26):
[a,b]=caeser(input,n)
cand=a.split(' ')
ans=0
for w in ['the','this','that']:
if w in cand:
ans=1
if w in b:
ans=1
if ans:
print b
break | xlmw mw xli tmgxyvi xlex m xsso mr xli xvmt.
| this is the picture that i took in the trip.
|
<H1>Caesar Cipher</H1>
<p>
In cryptography, Caesar cipher is one of the simplest and most widely known encryption method. Caesar cipher is a type of substitution cipher in which each letter in the text is replaced by a letter some fixed number of positions down the alphabet. For example, with a shift of 1, 'a' would be replaced by 'b', 'b' would become 'c', 'y' would become 'z', 'z' would become 'a', and so on. In that case, a text:
<pre>
this is a pen
</pre>
<p>
is would become:
</p>
<pre>
uijt jt b qfo
</pre>
<p>
Write a program which reads a text encrypted by Caesar Chipher and prints the corresponding decoded text. The number of shift is secret and it depends on datasets, but you can assume that the decoded text includes any of the following words: "the", "this", or "that".
</p>
<H2>Input</H2>
<p>
Input consists of several datasets. Each dataset consists of texts in a line. Input ends with EOF. The text consists of lower-case letters, periods, space, and end-of-lines. Only the letters have been encrypted. A line consists of at most 80 characters.
</p>
<p>
You may assume that you can create one decoded text which includes any of "the", "this", or "that" from the given input text.
</p>
<p>
The number of datasets is less than or equal to 20.
</p>
<H2>Output</H2>
<p>
Print decoded texts in a line.
</p>
<H2>Sample Input</H2>
<pre>
xlmw mw xli tmgxyvi xlex m xsso mr xli xvmt.
</pre>
<H2>Output for the Sample Input</H2>
<pre>
this is the picture that i took in the trip.
</pre>
|
s339486224 | p00017 | Wrong Answer | #!/usr/bin/env python
import re
def move(char, num):
if ord(char) + num <= ord('z'):
return ord(char) + num
else:
return ord(char) + num - (ord('z') - ord('a') + 1)
def shift(s, num):
new = ""
for i in range(0, len(s)):
if s[i].isalpha():
new += str(chr(move(s[i], num)));
else:
new += s[i]
return new
def decrypt(s):
for i in range(1, 26):
decrypted = shift(s, i)
if re.search('the|this|that', decrypted):
print(decrypted)
if __name__ == '__main__':
crypted = input()
print(decrypt(crypted)) | xlmw mw xli tmgxyvi xlex m xsso mr xli xvmt.
| this is the picture that i took in the trip.
|
<H1>Caesar Cipher</H1>
<p>
In cryptography, Caesar cipher is one of the simplest and most widely known encryption method. Caesar cipher is a type of substitution cipher in which each letter in the text is replaced by a letter some fixed number of positions down the alphabet. For example, with a shift of 1, 'a' would be replaced by 'b', 'b' would become 'c', 'y' would become 'z', 'z' would become 'a', and so on. In that case, a text:
<pre>
this is a pen
</pre>
<p>
is would become:
</p>
<pre>
uijt jt b qfo
</pre>
<p>
Write a program which reads a text encrypted by Caesar Chipher and prints the corresponding decoded text. The number of shift is secret and it depends on datasets, but you can assume that the decoded text includes any of the following words: "the", "this", or "that".
</p>
<H2>Input</H2>
<p>
Input consists of several datasets. Each dataset consists of texts in a line. Input ends with EOF. The text consists of lower-case letters, periods, space, and end-of-lines. Only the letters have been encrypted. A line consists of at most 80 characters.
</p>
<p>
You may assume that you can create one decoded text which includes any of "the", "this", or "that" from the given input text.
</p>
<p>
The number of datasets is less than or equal to 20.
</p>
<H2>Output</H2>
<p>
Print decoded texts in a line.
</p>
<H2>Sample Input</H2>
<pre>
xlmw mw xli tmgxyvi xlex m xsso mr xli xvmt.
</pre>
<H2>Output for the Sample Input</H2>
<pre>
this is the picture that i took in the trip.
</pre>
|
s602717000 | p00017 | Wrong Answer | #!/usr/bin/env python
import sys
import re
def move(char, num):
if ord(char) + num <= ord('z'):
return ord(char) + num
else:
return ord(char) + num - (ord('z') - ord('a') + 1)
def shift(s, num):
new = ""
for i in range(0, len(s)):
if s[i].isalpha():
new += str(chr(move(s[i], num)));
else:
new += s[i]
return new
def decrypt(s):
for i in range(1, 26):
decrypted = shift(s, i)
if re.search('the|this|that', decrypted):
print(decrypted)
if __name__ == '__main__':
for line in sys.stdin:
print(decrypt(line)) | xlmw mw xli tmgxyvi xlex m xsso mr xli xvmt.
| this is the picture that i took in the trip.
|
<H1>Caesar Cipher</H1>
<p>
In cryptography, Caesar cipher is one of the simplest and most widely known encryption method. Caesar cipher is a type of substitution cipher in which each letter in the text is replaced by a letter some fixed number of positions down the alphabet. For example, with a shift of 1, 'a' would be replaced by 'b', 'b' would become 'c', 'y' would become 'z', 'z' would become 'a', and so on. In that case, a text:
<pre>
this is a pen
</pre>
<p>
is would become:
</p>
<pre>
uijt jt b qfo
</pre>
<p>
Write a program which reads a text encrypted by Caesar Chipher and prints the corresponding decoded text. The number of shift is secret and it depends on datasets, but you can assume that the decoded text includes any of the following words: "the", "this", or "that".
</p>
<H2>Input</H2>
<p>
Input consists of several datasets. Each dataset consists of texts in a line. Input ends with EOF. The text consists of lower-case letters, periods, space, and end-of-lines. Only the letters have been encrypted. A line consists of at most 80 characters.
</p>
<p>
You may assume that you can create one decoded text which includes any of "the", "this", or "that" from the given input text.
</p>
<p>
The number of datasets is less than or equal to 20.
</p>
<H2>Output</H2>
<p>
Print decoded texts in a line.
</p>
<H2>Sample Input</H2>
<pre>
xlmw mw xli tmgxyvi xlex m xsso mr xli xvmt.
</pre>
<H2>Output for the Sample Input</H2>
<pre>
this is the picture that i took in the trip.
</pre>
|
s544080034 | p00017 | Wrong Answer | import sys
a = 'abcdefghijklmnopqrstuvwxyz'
for i in sys.stdin.readlines():
s = i.strip()
for j in range(1, 26):
t = s.translate(str.maketrans(a, a[j:] + a[:j]))
if 'the' in t or 'this' in t or 'that' in t:
print(t) | xlmw mw xli tmgxyvi xlex m xsso mr xli xvmt.
| this is the picture that i took in the trip.
|
<H1>Caesar Cipher</H1>
<p>
In cryptography, Caesar cipher is one of the simplest and most widely known encryption method. Caesar cipher is a type of substitution cipher in which each letter in the text is replaced by a letter some fixed number of positions down the alphabet. For example, with a shift of 1, 'a' would be replaced by 'b', 'b' would become 'c', 'y' would become 'z', 'z' would become 'a', and so on. In that case, a text:
<pre>
this is a pen
</pre>
<p>
is would become:
</p>
<pre>
uijt jt b qfo
</pre>
<p>
Write a program which reads a text encrypted by Caesar Chipher and prints the corresponding decoded text. The number of shift is secret and it depends on datasets, but you can assume that the decoded text includes any of the following words: "the", "this", or "that".
</p>
<H2>Input</H2>
<p>
Input consists of several datasets. Each dataset consists of texts in a line. Input ends with EOF. The text consists of lower-case letters, periods, space, and end-of-lines. Only the letters have been encrypted. A line consists of at most 80 characters.
</p>
<p>
You may assume that you can create one decoded text which includes any of "the", "this", or "that" from the given input text.
</p>
<p>
The number of datasets is less than or equal to 20.
</p>
<H2>Output</H2>
<p>
Print decoded texts in a line.
</p>
<H2>Sample Input</H2>
<pre>
xlmw mw xli tmgxyvi xlex m xsso mr xli xvmt.
</pre>
<H2>Output for the Sample Input</H2>
<pre>
this is the picture that i took in the trip.
</pre>
|
s084352397 | p00017 | Wrong Answer | def ceasar(sentence, n):
sentence = list(sentence)
for i in range(len(sentence)):
if sentence[i] in alphabets:
sentence[i] = alphabets[(alphabets.index(sentence[i]) + n) % 26]
return ''.join(sentence)
def is_right(sentence):
words = '.'.join(sentence.split(' ')).split('.')
return ('the' or 'this' or 'that') in words
alphabets = 'abcdefghijklmnopqrstuvwxyz'
while True:
try:
line = input()
if line == '*':
break
except:
break
for i in range(26):
if is_right(ceasar(line, i)):
print(ceasar(line, i))
break | xlmw mw xli tmgxyvi xlex m xsso mr xli xvmt.
| this is the picture that i took in the trip.
|
<H1>Caesar Cipher</H1>
<p>
In cryptography, Caesar cipher is one of the simplest and most widely known encryption method. Caesar cipher is a type of substitution cipher in which each letter in the text is replaced by a letter some fixed number of positions down the alphabet. For example, with a shift of 1, 'a' would be replaced by 'b', 'b' would become 'c', 'y' would become 'z', 'z' would become 'a', and so on. In that case, a text:
<pre>
this is a pen
</pre>
<p>
is would become:
</p>
<pre>
uijt jt b qfo
</pre>
<p>
Write a program which reads a text encrypted by Caesar Chipher and prints the corresponding decoded text. The number of shift is secret and it depends on datasets, but you can assume that the decoded text includes any of the following words: "the", "this", or "that".
</p>
<H2>Input</H2>
<p>
Input consists of several datasets. Each dataset consists of texts in a line. Input ends with EOF. The text consists of lower-case letters, periods, space, and end-of-lines. Only the letters have been encrypted. A line consists of at most 80 characters.
</p>
<p>
You may assume that you can create one decoded text which includes any of "the", "this", or "that" from the given input text.
</p>
<p>
The number of datasets is less than or equal to 20.
</p>
<H2>Output</H2>
<p>
Print decoded texts in a line.
</p>
<H2>Sample Input</H2>
<pre>
xlmw mw xli tmgxyvi xlex m xsso mr xli xvmt.
</pre>
<H2>Output for the Sample Input</H2>
<pre>
this is the picture that i took in the trip.
</pre>
|
s590937558 | p00017 | Wrong Answer | def rot(n, s):
r = ''
for c in s:
if c == ' ' or c == '.' : r+= c
else: r += chr((ord(c) - ord('a') + n) % 26 + ord('a'))
return r
while 1:
try:
s = raw_input()
n = 0
for i in xrange(25):
if 't' == rot(i, s[0]): n = i
print rot(n, s)
except:
break | xlmw mw xli tmgxyvi xlex m xsso mr xli xvmt.
| this is the picture that i took in the trip.
|
<H1>Caesar Cipher</H1>
<p>
In cryptography, Caesar cipher is one of the simplest and most widely known encryption method. Caesar cipher is a type of substitution cipher in which each letter in the text is replaced by a letter some fixed number of positions down the alphabet. For example, with a shift of 1, 'a' would be replaced by 'b', 'b' would become 'c', 'y' would become 'z', 'z' would become 'a', and so on. In that case, a text:
<pre>
this is a pen
</pre>
<p>
is would become:
</p>
<pre>
uijt jt b qfo
</pre>
<p>
Write a program which reads a text encrypted by Caesar Chipher and prints the corresponding decoded text. The number of shift is secret and it depends on datasets, but you can assume that the decoded text includes any of the following words: "the", "this", or "that".
</p>
<H2>Input</H2>
<p>
Input consists of several datasets. Each dataset consists of texts in a line. Input ends with EOF. The text consists of lower-case letters, periods, space, and end-of-lines. Only the letters have been encrypted. A line consists of at most 80 characters.
</p>
<p>
You may assume that you can create one decoded text which includes any of "the", "this", or "that" from the given input text.
</p>
<p>
The number of datasets is less than or equal to 20.
</p>
<H2>Output</H2>
<p>
Print decoded texts in a line.
</p>
<H2>Sample Input</H2>
<pre>
xlmw mw xli tmgxyvi xlex m xsso mr xli xvmt.
</pre>
<H2>Output for the Sample Input</H2>
<pre>
this is the picture that i took in the trip.
</pre>
|
s043439223 | p00017 | Wrong Answer | worddic = {}
def caesar(n, word):
rword = ''
for char in word:
rword += chr(ord('a') + (ord(char) - ord('a') + n) % 26)
return rword
for i in range(1,26):
worddic[caesar(i, 'the')] = i
worddic[caesar(i, 'this')] = i
worddic[caesar(i, 'that')] = i
str = raw_input()
for word in str.strip('.').split(' '):
if word in worddic.keys():
decode = worddic[word]
print ' '.join([caesar(26-decode, word) for word in str.strip('.').split(' ')]) + '.' | xlmw mw xli tmgxyvi xlex m xsso mr xli xvmt.
| this is the picture that i took in the trip.
|
<H1>Caesar Cipher</H1>
<p>
In cryptography, Caesar cipher is one of the simplest and most widely known encryption method. Caesar cipher is a type of substitution cipher in which each letter in the text is replaced by a letter some fixed number of positions down the alphabet. For example, with a shift of 1, 'a' would be replaced by 'b', 'b' would become 'c', 'y' would become 'z', 'z' would become 'a', and so on. In that case, a text:
<pre>
this is a pen
</pre>
<p>
is would become:
</p>
<pre>
uijt jt b qfo
</pre>
<p>
Write a program which reads a text encrypted by Caesar Chipher and prints the corresponding decoded text. The number of shift is secret and it depends on datasets, but you can assume that the decoded text includes any of the following words: "the", "this", or "that".
</p>
<H2>Input</H2>
<p>
Input consists of several datasets. Each dataset consists of texts in a line. Input ends with EOF. The text consists of lower-case letters, periods, space, and end-of-lines. Only the letters have been encrypted. A line consists of at most 80 characters.
</p>
<p>
You may assume that you can create one decoded text which includes any of "the", "this", or "that" from the given input text.
</p>
<p>
The number of datasets is less than or equal to 20.
</p>
<H2>Output</H2>
<p>
Print decoded texts in a line.
</p>
<H2>Sample Input</H2>
<pre>
xlmw mw xli tmgxyvi xlex m xsso mr xli xvmt.
</pre>
<H2>Output for the Sample Input</H2>
<pre>
this is the picture that i took in the trip.
</pre>
|
s838378286 | p00017 | Wrong Answer | worddic = {}
def caesar(n, word):
rword = ''
for char in word:
rword += chr(ord('a') + (ord(char) - ord('a') + n) % 26)
return rword
for i in range(1,26):
worddic[caesar(i, 'the')] = i
worddic[caesar(i, 'this')] = i
worddic[caesar(i, 'that')] = i
str = raw_input()
for word in str.strip('.').split(' '):
if word in worddic.keys():
decode = worddic[word]
break
print ' '.join([caesar(26-decode, word) for word in str.strip('.').split(' ')]) + '.' | xlmw mw xli tmgxyvi xlex m xsso mr xli xvmt.
| this is the picture that i took in the trip.
|
<H1>Caesar Cipher</H1>
<p>
In cryptography, Caesar cipher is one of the simplest and most widely known encryption method. Caesar cipher is a type of substitution cipher in which each letter in the text is replaced by a letter some fixed number of positions down the alphabet. For example, with a shift of 1, 'a' would be replaced by 'b', 'b' would become 'c', 'y' would become 'z', 'z' would become 'a', and so on. In that case, a text:
<pre>
this is a pen
</pre>
<p>
is would become:
</p>
<pre>
uijt jt b qfo
</pre>
<p>
Write a program which reads a text encrypted by Caesar Chipher and prints the corresponding decoded text. The number of shift is secret and it depends on datasets, but you can assume that the decoded text includes any of the following words: "the", "this", or "that".
</p>
<H2>Input</H2>
<p>
Input consists of several datasets. Each dataset consists of texts in a line. Input ends with EOF. The text consists of lower-case letters, periods, space, and end-of-lines. Only the letters have been encrypted. A line consists of at most 80 characters.
</p>
<p>
You may assume that you can create one decoded text which includes any of "the", "this", or "that" from the given input text.
</p>
<p>
The number of datasets is less than or equal to 20.
</p>
<H2>Output</H2>
<p>
Print decoded texts in a line.
</p>
<H2>Sample Input</H2>
<pre>
xlmw mw xli tmgxyvi xlex m xsso mr xli xvmt.
</pre>
<H2>Output for the Sample Input</H2>
<pre>
this is the picture that i took in the trip.
</pre>
|
s535488813 | p00017 | Wrong Answer | worddic = {}
def caesar(n, word):
rword = ''
for char in word:
rword += chr(ord('a') + (ord(char) - ord('a') + n) % 26)
return rword
for i in range(1,26):
worddic[caesar(i, 'the')] = i
worddic[caesar(i, 'this')] = i
worddic[caesar(i, 'that')] = i
str = raw_input()
for word in str.strip('.').split(' '):
if word in worddic.keys():
decode = worddic[word]
break
print ' '.join([caesar(26-decode, word) for word in str.strip('.').split(' ')]) + ('.' if str.find('.')>0 else '') | xlmw mw xli tmgxyvi xlex m xsso mr xli xvmt.
| this is the picture that i took in the trip.
|
<H1>Caesar Cipher</H1>
<p>
In cryptography, Caesar cipher is one of the simplest and most widely known encryption method. Caesar cipher is a type of substitution cipher in which each letter in the text is replaced by a letter some fixed number of positions down the alphabet. For example, with a shift of 1, 'a' would be replaced by 'b', 'b' would become 'c', 'y' would become 'z', 'z' would become 'a', and so on. In that case, a text:
<pre>
this is a pen
</pre>
<p>
is would become:
</p>
<pre>
uijt jt b qfo
</pre>
<p>
Write a program which reads a text encrypted by Caesar Chipher and prints the corresponding decoded text. The number of shift is secret and it depends on datasets, but you can assume that the decoded text includes any of the following words: "the", "this", or "that".
</p>
<H2>Input</H2>
<p>
Input consists of several datasets. Each dataset consists of texts in a line. Input ends with EOF. The text consists of lower-case letters, periods, space, and end-of-lines. Only the letters have been encrypted. A line consists of at most 80 characters.
</p>
<p>
You may assume that you can create one decoded text which includes any of "the", "this", or "that" from the given input text.
</p>
<p>
The number of datasets is less than or equal to 20.
</p>
<H2>Output</H2>
<p>
Print decoded texts in a line.
</p>
<H2>Sample Input</H2>
<pre>
xlmw mw xli tmgxyvi xlex m xsso mr xli xvmt.
</pre>
<H2>Output for the Sample Input</H2>
<pre>
this is the picture that i took in the trip.
</pre>
|
s331045168 | p00017 | Wrong Answer | worddic = {}
def caesar(n, word):
rword = ''
for char in word:
rword += chr(ord('a') + (ord(char) - ord('a') + n) % 26)
return rword
for i in range(0,26):
worddic[caesar(i, 'the')] = i
worddic[caesar(i, 'this')] = i
worddic[caesar(i, 'that')] = i
str = raw_input()
for word in str.strip('.').split(' '):
if word in worddic.keys():
decode = worddic[word]
break
print ' '.join([caesar(26-decode, word) for word in str.strip('.').split(' ')]) + ('.' if str.find('.')>0 else '') | xlmw mw xli tmgxyvi xlex m xsso mr xli xvmt.
| this is the picture that i took in the trip.
|
<H1>Caesar Cipher</H1>
<p>
In cryptography, Caesar cipher is one of the simplest and most widely known encryption method. Caesar cipher is a type of substitution cipher in which each letter in the text is replaced by a letter some fixed number of positions down the alphabet. For example, with a shift of 1, 'a' would be replaced by 'b', 'b' would become 'c', 'y' would become 'z', 'z' would become 'a', and so on. In that case, a text:
<pre>
this is a pen
</pre>
<p>
is would become:
</p>
<pre>
uijt jt b qfo
</pre>
<p>
Write a program which reads a text encrypted by Caesar Chipher and prints the corresponding decoded text. The number of shift is secret and it depends on datasets, but you can assume that the decoded text includes any of the following words: "the", "this", or "that".
</p>
<H2>Input</H2>
<p>
Input consists of several datasets. Each dataset consists of texts in a line. Input ends with EOF. The text consists of lower-case letters, periods, space, and end-of-lines. Only the letters have been encrypted. A line consists of at most 80 characters.
</p>
<p>
You may assume that you can create one decoded text which includes any of "the", "this", or "that" from the given input text.
</p>
<p>
The number of datasets is less than or equal to 20.
</p>
<H2>Output</H2>
<p>
Print decoded texts in a line.
</p>
<H2>Sample Input</H2>
<pre>
xlmw mw xli tmgxyvi xlex m xsso mr xli xvmt.
</pre>
<H2>Output for the Sample Input</H2>
<pre>
this is the picture that i took in the trip.
</pre>
|
s484057090 | p00017 | Wrong Answer | worddic = {}
def caesar(n, word):
rword = ''
for char in word:
rword += chr(ord('a') + (ord(char) - ord('a') + n) % 26)
return rword
for i in range(0,26):
worddic[caesar(i, 'the')] = i
worddic[caesar(i, 'this')] = i
worddic[caesar(i, 'that')] = i
str = raw_input()
for word in str.strip('. \n').split(' '):
if word in worddic.keys():
decode = worddic[word]
break
print ' '.join([caesar(26-decode, word) for word in str.strip('. \n').split(' ')]) + ('.' if str.find('.')>0 else '') | xlmw mw xli tmgxyvi xlex m xsso mr xli xvmt.
| this is the picture that i took in the trip.
|
<H1>Caesar Cipher</H1>
<p>
In cryptography, Caesar cipher is one of the simplest and most widely known encryption method. Caesar cipher is a type of substitution cipher in which each letter in the text is replaced by a letter some fixed number of positions down the alphabet. For example, with a shift of 1, 'a' would be replaced by 'b', 'b' would become 'c', 'y' would become 'z', 'z' would become 'a', and so on. In that case, a text:
<pre>
this is a pen
</pre>
<p>
is would become:
</p>
<pre>
uijt jt b qfo
</pre>
<p>
Write a program which reads a text encrypted by Caesar Chipher and prints the corresponding decoded text. The number of shift is secret and it depends on datasets, but you can assume that the decoded text includes any of the following words: "the", "this", or "that".
</p>
<H2>Input</H2>
<p>
Input consists of several datasets. Each dataset consists of texts in a line. Input ends with EOF. The text consists of lower-case letters, periods, space, and end-of-lines. Only the letters have been encrypted. A line consists of at most 80 characters.
</p>
<p>
You may assume that you can create one decoded text which includes any of "the", "this", or "that" from the given input text.
</p>
<p>
The number of datasets is less than or equal to 20.
</p>
<H2>Output</H2>
<p>
Print decoded texts in a line.
</p>
<H2>Sample Input</H2>
<pre>
xlmw mw xli tmgxyvi xlex m xsso mr xli xvmt.
</pre>
<H2>Output for the Sample Input</H2>
<pre>
this is the picture that i took in the trip.
</pre>
|
s100910991 | p00017 | Wrong Answer | line = input().split(' ')
alpha_li = [chr(i) for i in range(97,97+26)]
keys = ['the','this','that']
idx_t = alpha_li.index('t')
def look_for_n(li):
shift_n = alpha_li.index(li[0]) - idx_t
if rot(shift_n,li) in keys: return(shift_n)
else: return(False)
def rot(n,li):
str = ''
for s in li:
if s.isalpha(): str += alpha_li[(alpha_li.index(s)-n)%25]
else: str += s
return(str)
for word in line:
rot_n = look_for_n(list(word))
if rot_n: break
for k,word in enumerate(line):
line[k] = rot(rot_n,list(word))
print(' '.join(line)) | xlmw mw xli tmgxyvi xlex m xsso mr xli xvmt.
| this is the picture that i took in the trip.
|
<H1>Caesar Cipher</H1>
<p>
In cryptography, Caesar cipher is one of the simplest and most widely known encryption method. Caesar cipher is a type of substitution cipher in which each letter in the text is replaced by a letter some fixed number of positions down the alphabet. For example, with a shift of 1, 'a' would be replaced by 'b', 'b' would become 'c', 'y' would become 'z', 'z' would become 'a', and so on. In that case, a text:
<pre>
this is a pen
</pre>
<p>
is would become:
</p>
<pre>
uijt jt b qfo
</pre>
<p>
Write a program which reads a text encrypted by Caesar Chipher and prints the corresponding decoded text. The number of shift is secret and it depends on datasets, but you can assume that the decoded text includes any of the following words: "the", "this", or "that".
</p>
<H2>Input</H2>
<p>
Input consists of several datasets. Each dataset consists of texts in a line. Input ends with EOF. The text consists of lower-case letters, periods, space, and end-of-lines. Only the letters have been encrypted. A line consists of at most 80 characters.
</p>
<p>
You may assume that you can create one decoded text which includes any of "the", "this", or "that" from the given input text.
</p>
<p>
The number of datasets is less than or equal to 20.
</p>
<H2>Output</H2>
<p>
Print decoded texts in a line.
</p>
<H2>Sample Input</H2>
<pre>
xlmw mw xli tmgxyvi xlex m xsso mr xli xvmt.
</pre>
<H2>Output for the Sample Input</H2>
<pre>
this is the picture that i took in the trip.
</pre>
|
s200963871 | p00017 | Wrong Answer | def cshift(w):
r = ""
for c in w:
if c == 'z':
r += 'a'
else:
r += chr(ord(c)+1)
return r
while True:
try:
sent = input()
except EOFError:
break
words = sent[:-1].split()
while ("the" not in words) and ("this" not in words) and ("that" not in words):
for i, w in enumerate(words):
words[i] = cshift(w)
print(" ".join(words)+".") | xlmw mw xli tmgxyvi xlex m xsso mr xli xvmt.
| this is the picture that i took in the trip.
|
<H1>Caesar Cipher</H1>
<p>
In cryptography, Caesar cipher is one of the simplest and most widely known encryption method. Caesar cipher is a type of substitution cipher in which each letter in the text is replaced by a letter some fixed number of positions down the alphabet. For example, with a shift of 1, 'a' would be replaced by 'b', 'b' would become 'c', 'y' would become 'z', 'z' would become 'a', and so on. In that case, a text:
<pre>
this is a pen
</pre>
<p>
is would become:
</p>
<pre>
uijt jt b qfo
</pre>
<p>
Write a program which reads a text encrypted by Caesar Chipher and prints the corresponding decoded text. The number of shift is secret and it depends on datasets, but you can assume that the decoded text includes any of the following words: "the", "this", or "that".
</p>
<H2>Input</H2>
<p>
Input consists of several datasets. Each dataset consists of texts in a line. Input ends with EOF. The text consists of lower-case letters, periods, space, and end-of-lines. Only the letters have been encrypted. A line consists of at most 80 characters.
</p>
<p>
You may assume that you can create one decoded text which includes any of "the", "this", or "that" from the given input text.
</p>
<p>
The number of datasets is less than or equal to 20.
</p>
<H2>Output</H2>
<p>
Print decoded texts in a line.
</p>
<H2>Sample Input</H2>
<pre>
xlmw mw xli tmgxyvi xlex m xsso mr xli xvmt.
</pre>
<H2>Output for the Sample Input</H2>
<pre>
this is the picture that i took in the trip.
</pre>
|
s577653067 | p00017 | Wrong Answer | import sys
def decrypt(c, i):
""" ????????¶????????? """
if c.isalpha():
t = ord(c) - i
if t < ord('a'):
t = ord('z') - i + 1
return chr(t)
else:
return c
if __name__ == '__main__':
# ??????????????\???
for line in sys.stdin:
# ?????????????????????
found = '' # ?????????????????????
for i in range(1, 25):
decrypted = ''.join([decrypt(x, i) for x in line])
# print(decrypted)
if 'the' in decrypted or 'this' in decrypted or 'that' in decrypted:
found = decrypted
break
# ???????????????
if found:
print(found) | xlmw mw xli tmgxyvi xlex m xsso mr xli xvmt.
| this is the picture that i took in the trip.
|
<H1>Caesar Cipher</H1>
<p>
In cryptography, Caesar cipher is one of the simplest and most widely known encryption method. Caesar cipher is a type of substitution cipher in which each letter in the text is replaced by a letter some fixed number of positions down the alphabet. For example, with a shift of 1, 'a' would be replaced by 'b', 'b' would become 'c', 'y' would become 'z', 'z' would become 'a', and so on. In that case, a text:
<pre>
this is a pen
</pre>
<p>
is would become:
</p>
<pre>
uijt jt b qfo
</pre>
<p>
Write a program which reads a text encrypted by Caesar Chipher and prints the corresponding decoded text. The number of shift is secret and it depends on datasets, but you can assume that the decoded text includes any of the following words: "the", "this", or "that".
</p>
<H2>Input</H2>
<p>
Input consists of several datasets. Each dataset consists of texts in a line. Input ends with EOF. The text consists of lower-case letters, periods, space, and end-of-lines. Only the letters have been encrypted. A line consists of at most 80 characters.
</p>
<p>
You may assume that you can create one decoded text which includes any of "the", "this", or "that" from the given input text.
</p>
<p>
The number of datasets is less than or equal to 20.
</p>
<H2>Output</H2>
<p>
Print decoded texts in a line.
</p>
<H2>Sample Input</H2>
<pre>
xlmw mw xli tmgxyvi xlex m xsso mr xli xvmt.
</pre>
<H2>Output for the Sample Input</H2>
<pre>
this is the picture that i took in the trip.
</pre>
|
s759651051 | p00017 | Wrong Answer | import sys
def decrypt(c, i):
""" ????????¶????????? """
if c.isalpha():
t = ord(c) - i
if t < ord('a'):
t = ord('z') - i + 1
return chr(t)
else:
return c
if __name__ == '__main__':
# ??????????????\???
for line in sys.stdin:
# ?????????????????????
found = '' # ?????????????????????
for i in range(1, 25):
decrypted = ''.join([decrypt(x, i) for x in line.strip()])
# print(decrypted)
if 'the' in decrypted or 'this' in decrypted or 'that' in decrypted:
found = decrypted
break
# ???????????????
if found:
print(found) | xlmw mw xli tmgxyvi xlex m xsso mr xli xvmt.
| this is the picture that i took in the trip.
|
<H1>Caesar Cipher</H1>
<p>
In cryptography, Caesar cipher is one of the simplest and most widely known encryption method. Caesar cipher is a type of substitution cipher in which each letter in the text is replaced by a letter some fixed number of positions down the alphabet. For example, with a shift of 1, 'a' would be replaced by 'b', 'b' would become 'c', 'y' would become 'z', 'z' would become 'a', and so on. In that case, a text:
<pre>
this is a pen
</pre>
<p>
is would become:
</p>
<pre>
uijt jt b qfo
</pre>
<p>
Write a program which reads a text encrypted by Caesar Chipher and prints the corresponding decoded text. The number of shift is secret and it depends on datasets, but you can assume that the decoded text includes any of the following words: "the", "this", or "that".
</p>
<H2>Input</H2>
<p>
Input consists of several datasets. Each dataset consists of texts in a line. Input ends with EOF. The text consists of lower-case letters, periods, space, and end-of-lines. Only the letters have been encrypted. A line consists of at most 80 characters.
</p>
<p>
You may assume that you can create one decoded text which includes any of "the", "this", or "that" from the given input text.
</p>
<p>
The number of datasets is less than or equal to 20.
</p>
<H2>Output</H2>
<p>
Print decoded texts in a line.
</p>
<H2>Sample Input</H2>
<pre>
xlmw mw xli tmgxyvi xlex m xsso mr xli xvmt.
</pre>
<H2>Output for the Sample Input</H2>
<pre>
this is the picture that i took in the trip.
</pre>
|
s670506745 | p00017 | Wrong Answer | import sys
def decrypt(c, i):
""" ????????¶????????? """
if c.isalpha():
t = ord(c) - i
if t < ord('a'):
t = ord('z') - i + 1
return chr(t)
else:
return c
if __name__ == '__main__':
# ??????????????\???
for line in sys.stdin:
# ?????????????????????
found = '' # ?????????????????????
for i in range(0, 26):
decrypted = ''.join([decrypt(x, i) for x in line.strip()])
# print(decrypted)
if 'the' in decrypted or 'this' in decrypted or 'that' in decrypted:
found = decrypted
break
# ???????????????
if found:
print(found) | xlmw mw xli tmgxyvi xlex m xsso mr xli xvmt.
| this is the picture that i took in the trip.
|
<H1>Caesar Cipher</H1>
<p>
In cryptography, Caesar cipher is one of the simplest and most widely known encryption method. Caesar cipher is a type of substitution cipher in which each letter in the text is replaced by a letter some fixed number of positions down the alphabet. For example, with a shift of 1, 'a' would be replaced by 'b', 'b' would become 'c', 'y' would become 'z', 'z' would become 'a', and so on. In that case, a text:
<pre>
this is a pen
</pre>
<p>
is would become:
</p>
<pre>
uijt jt b qfo
</pre>
<p>
Write a program which reads a text encrypted by Caesar Chipher and prints the corresponding decoded text. The number of shift is secret and it depends on datasets, but you can assume that the decoded text includes any of the following words: "the", "this", or "that".
</p>
<H2>Input</H2>
<p>
Input consists of several datasets. Each dataset consists of texts in a line. Input ends with EOF. The text consists of lower-case letters, periods, space, and end-of-lines. Only the letters have been encrypted. A line consists of at most 80 characters.
</p>
<p>
You may assume that you can create one decoded text which includes any of "the", "this", or "that" from the given input text.
</p>
<p>
The number of datasets is less than or equal to 20.
</p>
<H2>Output</H2>
<p>
Print decoded texts in a line.
</p>
<H2>Sample Input</H2>
<pre>
xlmw mw xli tmgxyvi xlex m xsso mr xli xvmt.
</pre>
<H2>Output for the Sample Input</H2>
<pre>
this is the picture that i took in the trip.
</pre>
|
s851955247 | p00017 | Wrong Answer | import sys
def decrypt(c, i):
""" ????????¶????????? """
if c.isalpha():
t = ord(c) - i
if t < ord('a'):
t = ord('z') - i + 1
return chr(t)
else:
return c
if __name__ == '__main__':
# ??????????????\???
for line in sys.stdin:
# ?????????????????????
found = '' # ?????????????????????
for i in range(0, 26):
decrypted = ''.join([decrypt(x, i) for x in line.strip()])
# print(decrypted)
if ' the ' in decrypted or ' this ' in decrypted or ' that ' in decrypted or \
decrypted.startswith('the ') or decrypted.startswith('this ') or decrypted.startswith('that '):
found = decrypted
break
# ???????????????
if found:
print(found) | xlmw mw xli tmgxyvi xlex m xsso mr xli xvmt.
| this is the picture that i took in the trip.
|
<H1>Caesar Cipher</H1>
<p>
In cryptography, Caesar cipher is one of the simplest and most widely known encryption method. Caesar cipher is a type of substitution cipher in which each letter in the text is replaced by a letter some fixed number of positions down the alphabet. For example, with a shift of 1, 'a' would be replaced by 'b', 'b' would become 'c', 'y' would become 'z', 'z' would become 'a', and so on. In that case, a text:
<pre>
this is a pen
</pre>
<p>
is would become:
</p>
<pre>
uijt jt b qfo
</pre>
<p>
Write a program which reads a text encrypted by Caesar Chipher and prints the corresponding decoded text. The number of shift is secret and it depends on datasets, but you can assume that the decoded text includes any of the following words: "the", "this", or "that".
</p>
<H2>Input</H2>
<p>
Input consists of several datasets. Each dataset consists of texts in a line. Input ends with EOF. The text consists of lower-case letters, periods, space, and end-of-lines. Only the letters have been encrypted. A line consists of at most 80 characters.
</p>
<p>
You may assume that you can create one decoded text which includes any of "the", "this", or "that" from the given input text.
</p>
<p>
The number of datasets is less than or equal to 20.
</p>
<H2>Output</H2>
<p>
Print decoded texts in a line.
</p>
<H2>Sample Input</H2>
<pre>
xlmw mw xli tmgxyvi xlex m xsso mr xli xvmt.
</pre>
<H2>Output for the Sample Input</H2>
<pre>
this is the picture that i took in the trip.
</pre>
|
s309500945 | p00017 | Wrong Answer | def chg(s,n):
res=""
for i in s:
o=ord(i)
if 97<=o<=122:
if o+n<=122:
res+=chr(o+n)
else:
res+=chr(o+n-26)
else:
res+=i
return res
while True:
try:
s=input()
for i in range(26):
c=chg(s,i)
if ("the" or "this" or "that") in list(c.split()):
print(c)
break
except:
break | xlmw mw xli tmgxyvi xlex m xsso mr xli xvmt.
| this is the picture that i took in the trip.
|
<H1>Caesar Cipher</H1>
<p>
In cryptography, Caesar cipher is one of the simplest and most widely known encryption method. Caesar cipher is a type of substitution cipher in which each letter in the text is replaced by a letter some fixed number of positions down the alphabet. For example, with a shift of 1, 'a' would be replaced by 'b', 'b' would become 'c', 'y' would become 'z', 'z' would become 'a', and so on. In that case, a text:
<pre>
this is a pen
</pre>
<p>
is would become:
</p>
<pre>
uijt jt b qfo
</pre>
<p>
Write a program which reads a text encrypted by Caesar Chipher and prints the corresponding decoded text. The number of shift is secret and it depends on datasets, but you can assume that the decoded text includes any of the following words: "the", "this", or "that".
</p>
<H2>Input</H2>
<p>
Input consists of several datasets. Each dataset consists of texts in a line. Input ends with EOF. The text consists of lower-case letters, periods, space, and end-of-lines. Only the letters have been encrypted. A line consists of at most 80 characters.
</p>
<p>
You may assume that you can create one decoded text which includes any of "the", "this", or "that" from the given input text.
</p>
<p>
The number of datasets is less than or equal to 20.
</p>
<H2>Output</H2>
<p>
Print decoded texts in a line.
</p>
<H2>Sample Input</H2>
<pre>
xlmw mw xli tmgxyvi xlex m xsso mr xli xvmt.
</pre>
<H2>Output for the Sample Input</H2>
<pre>
this is the picture that i took in the trip.
</pre>
|
s725253591 | p00017 | Wrong Answer | def chg(s,n):
res=""
for i in s:
o=ord(i)
if 97<=o<=122:
if o+n<=122:
res+=chr(o+n)
else:
res+=chr(o+n-26)
else:
res+=i
return res
while True:
try:
s=input()
for i in range(25,-1,-1):
c=chg(s,i)
if ("the" or "this" or "that") in c.split():
print(c)
break
except:
break | xlmw mw xli tmgxyvi xlex m xsso mr xli xvmt.
| this is the picture that i took in the trip.
|
<H1>Caesar Cipher</H1>
<p>
In cryptography, Caesar cipher is one of the simplest and most widely known encryption method. Caesar cipher is a type of substitution cipher in which each letter in the text is replaced by a letter some fixed number of positions down the alphabet. For example, with a shift of 1, 'a' would be replaced by 'b', 'b' would become 'c', 'y' would become 'z', 'z' would become 'a', and so on. In that case, a text:
<pre>
this is a pen
</pre>
<p>
is would become:
</p>
<pre>
uijt jt b qfo
</pre>
<p>
Write a program which reads a text encrypted by Caesar Chipher and prints the corresponding decoded text. The number of shift is secret and it depends on datasets, but you can assume that the decoded text includes any of the following words: "the", "this", or "that".
</p>
<H2>Input</H2>
<p>
Input consists of several datasets. Each dataset consists of texts in a line. Input ends with EOF. The text consists of lower-case letters, periods, space, and end-of-lines. Only the letters have been encrypted. A line consists of at most 80 characters.
</p>
<p>
You may assume that you can create one decoded text which includes any of "the", "this", or "that" from the given input text.
</p>
<p>
The number of datasets is less than or equal to 20.
</p>
<H2>Output</H2>
<p>
Print decoded texts in a line.
</p>
<H2>Sample Input</H2>
<pre>
xlmw mw xli tmgxyvi xlex m xsso mr xli xvmt.
</pre>
<H2>Output for the Sample Input</H2>
<pre>
this is the picture that i took in the trip.
</pre>
|
s160870685 | p00017 | Wrong Answer | def decode(s, n):
a = ""
for i in s:
if i.isalpha():
a += chr((ord(i) - 97 + n) % 26 + 97)
else:
a += i
return a
def judge(s):
a = s.split()
return ("the"or"that"or"this") in a
while True:
try:
s = input()
except:
break
for i in range(1, 26):
a = decode(s, i)
if judge(a):
print(a)
break | xlmw mw xli tmgxyvi xlex m xsso mr xli xvmt.
| this is the picture that i took in the trip.
|
<H1>Caesar Cipher</H1>
<p>
In cryptography, Caesar cipher is one of the simplest and most widely known encryption method. Caesar cipher is a type of substitution cipher in which each letter in the text is replaced by a letter some fixed number of positions down the alphabet. For example, with a shift of 1, 'a' would be replaced by 'b', 'b' would become 'c', 'y' would become 'z', 'z' would become 'a', and so on. In that case, a text:
<pre>
this is a pen
</pre>
<p>
is would become:
</p>
<pre>
uijt jt b qfo
</pre>
<p>
Write a program which reads a text encrypted by Caesar Chipher and prints the corresponding decoded text. The number of shift is secret and it depends on datasets, but you can assume that the decoded text includes any of the following words: "the", "this", or "that".
</p>
<H2>Input</H2>
<p>
Input consists of several datasets. Each dataset consists of texts in a line. Input ends with EOF. The text consists of lower-case letters, periods, space, and end-of-lines. Only the letters have been encrypted. A line consists of at most 80 characters.
</p>
<p>
You may assume that you can create one decoded text which includes any of "the", "this", or "that" from the given input text.
</p>
<p>
The number of datasets is less than or equal to 20.
</p>
<H2>Output</H2>
<p>
Print decoded texts in a line.
</p>
<H2>Sample Input</H2>
<pre>
xlmw mw xli tmgxyvi xlex m xsso mr xli xvmt.
</pre>
<H2>Output for the Sample Input</H2>
<pre>
this is the picture that i took in the trip.
</pre>
|
s322827050 | p00017 | Wrong Answer | def decode(s, n):
a = ""
for i in s:
if i.isalpha():
a += chr((ord(i) - 97 + n) % 26 + 97)
else:
a += i
return a
def judge(s):
a = s.split()
return "the" in a or "this" in a or "that" in a
while True:
try:
s = input()
except:
break
for i in range(1, 26):
a = decode(s, i)
if judge(a):
break | xlmw mw xli tmgxyvi xlex m xsso mr xli xvmt.
| this is the picture that i took in the trip.
|
<H1>Caesar Cipher</H1>
<p>
In cryptography, Caesar cipher is one of the simplest and most widely known encryption method. Caesar cipher is a type of substitution cipher in which each letter in the text is replaced by a letter some fixed number of positions down the alphabet. For example, with a shift of 1, 'a' would be replaced by 'b', 'b' would become 'c', 'y' would become 'z', 'z' would become 'a', and so on. In that case, a text:
<pre>
this is a pen
</pre>
<p>
is would become:
</p>
<pre>
uijt jt b qfo
</pre>
<p>
Write a program which reads a text encrypted by Caesar Chipher and prints the corresponding decoded text. The number of shift is secret and it depends on datasets, but you can assume that the decoded text includes any of the following words: "the", "this", or "that".
</p>
<H2>Input</H2>
<p>
Input consists of several datasets. Each dataset consists of texts in a line. Input ends with EOF. The text consists of lower-case letters, periods, space, and end-of-lines. Only the letters have been encrypted. A line consists of at most 80 characters.
</p>
<p>
You may assume that you can create one decoded text which includes any of "the", "this", or "that" from the given input text.
</p>
<p>
The number of datasets is less than or equal to 20.
</p>
<H2>Output</H2>
<p>
Print decoded texts in a line.
</p>
<H2>Sample Input</H2>
<pre>
xlmw mw xli tmgxyvi xlex m xsso mr xli xvmt.
</pre>
<H2>Output for the Sample Input</H2>
<pre>
this is the picture that i took in the trip.
</pre>
|
s791302210 | p00017 | Wrong Answer | def decode(s, n):
a = ""
for i in s:
if i.isalpha():
a += chr((ord(i) - 97 + n) % 26 + 97)
else:
a += i
return a
def judge(s):
a = s.split()
return "the" in a or "this" in a or "that" in a
while True:
try:
s = input()
except:
break
for i in range(1, 26):
a = decode(s, i)
if judge(a):
print(a)
break | xlmw mw xli tmgxyvi xlex m xsso mr xli xvmt.
| this is the picture that i took in the trip.
|
<H1>Caesar Cipher</H1>
<p>
In cryptography, Caesar cipher is one of the simplest and most widely known encryption method. Caesar cipher is a type of substitution cipher in which each letter in the text is replaced by a letter some fixed number of positions down the alphabet. For example, with a shift of 1, 'a' would be replaced by 'b', 'b' would become 'c', 'y' would become 'z', 'z' would become 'a', and so on. In that case, a text:
<pre>
this is a pen
</pre>
<p>
is would become:
</p>
<pre>
uijt jt b qfo
</pre>
<p>
Write a program which reads a text encrypted by Caesar Chipher and prints the corresponding decoded text. The number of shift is secret and it depends on datasets, but you can assume that the decoded text includes any of the following words: "the", "this", or "that".
</p>
<H2>Input</H2>
<p>
Input consists of several datasets. Each dataset consists of texts in a line. Input ends with EOF. The text consists of lower-case letters, periods, space, and end-of-lines. Only the letters have been encrypted. A line consists of at most 80 characters.
</p>
<p>
You may assume that you can create one decoded text which includes any of "the", "this", or "that" from the given input text.
</p>
<p>
The number of datasets is less than or equal to 20.
</p>
<H2>Output</H2>
<p>
Print decoded texts in a line.
</p>
<H2>Sample Input</H2>
<pre>
xlmw mw xli tmgxyvi xlex m xsso mr xli xvmt.
</pre>
<H2>Output for the Sample Input</H2>
<pre>
this is the picture that i took in the trip.
</pre>
|
s624089595 | p00017 | Wrong Answer | def decode(s, n):
a = ""
for i in s:
if i.islower():
a += chr((ord(i) - 97 + n) % 26 + 97)
else:
a += i
return a
def judge(s):
a = s.split()
return "the" in a or "this" in a or "that" in a
while True:
try:
s = input()
except:
break
for i in range(1, 26):
a = decode(s, i)
if judge(a):
print(a)
break | xlmw mw xli tmgxyvi xlex m xsso mr xli xvmt.
| this is the picture that i took in the trip.
|
<H1>Caesar Cipher</H1>
<p>
In cryptography, Caesar cipher is one of the simplest and most widely known encryption method. Caesar cipher is a type of substitution cipher in which each letter in the text is replaced by a letter some fixed number of positions down the alphabet. For example, with a shift of 1, 'a' would be replaced by 'b', 'b' would become 'c', 'y' would become 'z', 'z' would become 'a', and so on. In that case, a text:
<pre>
this is a pen
</pre>
<p>
is would become:
</p>
<pre>
uijt jt b qfo
</pre>
<p>
Write a program which reads a text encrypted by Caesar Chipher and prints the corresponding decoded text. The number of shift is secret and it depends on datasets, but you can assume that the decoded text includes any of the following words: "the", "this", or "that".
</p>
<H2>Input</H2>
<p>
Input consists of several datasets. Each dataset consists of texts in a line. Input ends with EOF. The text consists of lower-case letters, periods, space, and end-of-lines. Only the letters have been encrypted. A line consists of at most 80 characters.
</p>
<p>
You may assume that you can create one decoded text which includes any of "the", "this", or "that" from the given input text.
</p>
<p>
The number of datasets is less than or equal to 20.
</p>
<H2>Output</H2>
<p>
Print decoded texts in a line.
</p>
<H2>Sample Input</H2>
<pre>
xlmw mw xli tmgxyvi xlex m xsso mr xli xvmt.
</pre>
<H2>Output for the Sample Input</H2>
<pre>
this is the picture that i took in the trip.
</pre>
|
s660643053 | p00017 | Wrong Answer | def decode(s, n):
a = ""
for i in s:
if i.islower():
a += chr((ord(i) - 97 + n) % 26 + 97)
else:
a += i
return a
def judge(s):
a = s.strip(".").split()
return "the" in a or "this" in a or "that" in a
while True:
try:
s = input()
except:
break
for i in range(1, 26):
a = decode(s, i)
if judge(a):
print(a)
break | xlmw mw xli tmgxyvi xlex m xsso mr xli xvmt.
| this is the picture that i took in the trip.
|
<H1>Caesar Cipher</H1>
<p>
In cryptography, Caesar cipher is one of the simplest and most widely known encryption method. Caesar cipher is a type of substitution cipher in which each letter in the text is replaced by a letter some fixed number of positions down the alphabet. For example, with a shift of 1, 'a' would be replaced by 'b', 'b' would become 'c', 'y' would become 'z', 'z' would become 'a', and so on. In that case, a text:
<pre>
this is a pen
</pre>
<p>
is would become:
</p>
<pre>
uijt jt b qfo
</pre>
<p>
Write a program which reads a text encrypted by Caesar Chipher and prints the corresponding decoded text. The number of shift is secret and it depends on datasets, but you can assume that the decoded text includes any of the following words: "the", "this", or "that".
</p>
<H2>Input</H2>
<p>
Input consists of several datasets. Each dataset consists of texts in a line. Input ends with EOF. The text consists of lower-case letters, periods, space, and end-of-lines. Only the letters have been encrypted. A line consists of at most 80 characters.
</p>
<p>
You may assume that you can create one decoded text which includes any of "the", "this", or "that" from the given input text.
</p>
<p>
The number of datasets is less than or equal to 20.
</p>
<H2>Output</H2>
<p>
Print decoded texts in a line.
</p>
<H2>Sample Input</H2>
<pre>
xlmw mw xli tmgxyvi xlex m xsso mr xli xvmt.
</pre>
<H2>Output for the Sample Input</H2>
<pre>
this is the picture that i took in the trip.
</pre>
|
s456831231 | p00017 | Wrong Answer | def decode(s, n):
a = ""
for i in s:
if i.islower():
o = ord(i) + n
if o <= 122:
a += chr(o)
else:
a += chr(o - 26)
else:
a += i
return a
def judge(s):
a = s.rstrip(".").split()
return "the" in a or "this" in a or "that" in a
while True:
try:
s = input()
except:
break
for i in range(1, 26):
a = decode(s, i)
if judge(a):
print(a)
break | xlmw mw xli tmgxyvi xlex m xsso mr xli xvmt.
| this is the picture that i took in the trip.
|
<H1>Caesar Cipher</H1>
<p>
In cryptography, Caesar cipher is one of the simplest and most widely known encryption method. Caesar cipher is a type of substitution cipher in which each letter in the text is replaced by a letter some fixed number of positions down the alphabet. For example, with a shift of 1, 'a' would be replaced by 'b', 'b' would become 'c', 'y' would become 'z', 'z' would become 'a', and so on. In that case, a text:
<pre>
this is a pen
</pre>
<p>
is would become:
</p>
<pre>
uijt jt b qfo
</pre>
<p>
Write a program which reads a text encrypted by Caesar Chipher and prints the corresponding decoded text. The number of shift is secret and it depends on datasets, but you can assume that the decoded text includes any of the following words: "the", "this", or "that".
</p>
<H2>Input</H2>
<p>
Input consists of several datasets. Each dataset consists of texts in a line. Input ends with EOF. The text consists of lower-case letters, periods, space, and end-of-lines. Only the letters have been encrypted. A line consists of at most 80 characters.
</p>
<p>
You may assume that you can create one decoded text which includes any of "the", "this", or "that" from the given input text.
</p>
<p>
The number of datasets is less than or equal to 20.
</p>
<H2>Output</H2>
<p>
Print decoded texts in a line.
</p>
<H2>Sample Input</H2>
<pre>
xlmw mw xli tmgxyvi xlex m xsso mr xli xvmt.
</pre>
<H2>Output for the Sample Input</H2>
<pre>
this is the picture that i took in the trip.
</pre>
|
s248395563 | p00017 | Wrong Answer | def decode(s, n):
a = ""
for i in s:
if i.islower():
o = ord(i) + n
if o <= 122:
a += chr(o)
else:
a += chr(o - 26)
else:
a += i
return a
def judge(s):
a = s.split()
return "the" in a or "this" in a or "that" in a
while True:
try:
s = input()
except:
break
for i in range(1, 26):
a = decode(s, i)
if judge(a):
print(a)
break | xlmw mw xli tmgxyvi xlex m xsso mr xli xvmt.
| this is the picture that i took in the trip.
|
<H1>Caesar Cipher</H1>
<p>
In cryptography, Caesar cipher is one of the simplest and most widely known encryption method. Caesar cipher is a type of substitution cipher in which each letter in the text is replaced by a letter some fixed number of positions down the alphabet. For example, with a shift of 1, 'a' would be replaced by 'b', 'b' would become 'c', 'y' would become 'z', 'z' would become 'a', and so on. In that case, a text:
<pre>
this is a pen
</pre>
<p>
is would become:
</p>
<pre>
uijt jt b qfo
</pre>
<p>
Write a program which reads a text encrypted by Caesar Chipher and prints the corresponding decoded text. The number of shift is secret and it depends on datasets, but you can assume that the decoded text includes any of the following words: "the", "this", or "that".
</p>
<H2>Input</H2>
<p>
Input consists of several datasets. Each dataset consists of texts in a line. Input ends with EOF. The text consists of lower-case letters, periods, space, and end-of-lines. Only the letters have been encrypted. A line consists of at most 80 characters.
</p>
<p>
You may assume that you can create one decoded text which includes any of "the", "this", or "that" from the given input text.
</p>
<p>
The number of datasets is less than or equal to 20.
</p>
<H2>Output</H2>
<p>
Print decoded texts in a line.
</p>
<H2>Sample Input</H2>
<pre>
xlmw mw xli tmgxyvi xlex m xsso mr xli xvmt.
</pre>
<H2>Output for the Sample Input</H2>
<pre>
this is the picture that i took in the trip.
</pre>
|
s242070935 | p00017 | Wrong Answer | s = list(map(str,input()))
t = []
for c in s:
t.append(ord(c))
for i in range(26):
string = ''
for j in range(len(s)):
if t[j] >= 97 and 122 >= t[j]:
l = 97 + ((t[j] - 97 + i) % 26)
string += chr(l)
else:
string += chr(t[j])
if 'this' in string or 'the' in string or 'that' in string:
print(string) | xlmw mw xli tmgxyvi xlex m xsso mr xli xvmt.
| this is the picture that i took in the trip.
|
<H1>Caesar Cipher</H1>
<p>
In cryptography, Caesar cipher is one of the simplest and most widely known encryption method. Caesar cipher is a type of substitution cipher in which each letter in the text is replaced by a letter some fixed number of positions down the alphabet. For example, with a shift of 1, 'a' would be replaced by 'b', 'b' would become 'c', 'y' would become 'z', 'z' would become 'a', and so on. In that case, a text:
<pre>
this is a pen
</pre>
<p>
is would become:
</p>
<pre>
uijt jt b qfo
</pre>
<p>
Write a program which reads a text encrypted by Caesar Chipher and prints the corresponding decoded text. The number of shift is secret and it depends on datasets, but you can assume that the decoded text includes any of the following words: "the", "this", or "that".
</p>
<H2>Input</H2>
<p>
Input consists of several datasets. Each dataset consists of texts in a line. Input ends with EOF. The text consists of lower-case letters, periods, space, and end-of-lines. Only the letters have been encrypted. A line consists of at most 80 characters.
</p>
<p>
You may assume that you can create one decoded text which includes any of "the", "this", or "that" from the given input text.
</p>
<p>
The number of datasets is less than or equal to 20.
</p>
<H2>Output</H2>
<p>
Print decoded texts in a line.
</p>
<H2>Sample Input</H2>
<pre>
xlmw mw xli tmgxyvi xlex m xsso mr xli xvmt.
</pre>
<H2>Output for the Sample Input</H2>
<pre>
this is the picture that i took in the trip.
</pre>
|
s995356990 | p00017 | Wrong Answer | d= dict(zip([chr(i) for i in range(97, 123)], [chr(i) for i in range(119,123)]+[chr(i) for i in range(97, 119)]))
while 1:
try:
text= input()
for i in input():
t= d.get(i)
print(i if t== None else t, end='')
print()
except:
break | xlmw mw xli tmgxyvi xlex m xsso mr xli xvmt.
| this is the picture that i took in the trip.
|
<H1>Caesar Cipher</H1>
<p>
In cryptography, Caesar cipher is one of the simplest and most widely known encryption method. Caesar cipher is a type of substitution cipher in which each letter in the text is replaced by a letter some fixed number of positions down the alphabet. For example, with a shift of 1, 'a' would be replaced by 'b', 'b' would become 'c', 'y' would become 'z', 'z' would become 'a', and so on. In that case, a text:
<pre>
this is a pen
</pre>
<p>
is would become:
</p>
<pre>
uijt jt b qfo
</pre>
<p>
Write a program which reads a text encrypted by Caesar Chipher and prints the corresponding decoded text. The number of shift is secret and it depends on datasets, but you can assume that the decoded text includes any of the following words: "the", "this", or "that".
</p>
<H2>Input</H2>
<p>
Input consists of several datasets. Each dataset consists of texts in a line. Input ends with EOF. The text consists of lower-case letters, periods, space, and end-of-lines. Only the letters have been encrypted. A line consists of at most 80 characters.
</p>
<p>
You may assume that you can create one decoded text which includes any of "the", "this", or "that" from the given input text.
</p>
<p>
The number of datasets is less than or equal to 20.
</p>
<H2>Output</H2>
<p>
Print decoded texts in a line.
</p>
<H2>Sample Input</H2>
<pre>
xlmw mw xli tmgxyvi xlex m xsso mr xli xvmt.
</pre>
<H2>Output for the Sample Input</H2>
<pre>
this is the picture that i took in the trip.
</pre>
|
s094293636 | p00017 | Wrong Answer | d= dict(zip([chr(i) for i in range(97, 123)], [chr(i) for i in range(119,123)]+[chr(i) for i in range(97, 119)]))
while 1:
try:
for i in input():
t= d.get(i)
print(i if t== None else t, end='')
print()
except:
break | xlmw mw xli tmgxyvi xlex m xsso mr xli xvmt.
| this is the picture that i took in the trip.
|
<H1>Caesar Cipher</H1>
<p>
In cryptography, Caesar cipher is one of the simplest and most widely known encryption method. Caesar cipher is a type of substitution cipher in which each letter in the text is replaced by a letter some fixed number of positions down the alphabet. For example, with a shift of 1, 'a' would be replaced by 'b', 'b' would become 'c', 'y' would become 'z', 'z' would become 'a', and so on. In that case, a text:
<pre>
this is a pen
</pre>
<p>
is would become:
</p>
<pre>
uijt jt b qfo
</pre>
<p>
Write a program which reads a text encrypted by Caesar Chipher and prints the corresponding decoded text. The number of shift is secret and it depends on datasets, but you can assume that the decoded text includes any of the following words: "the", "this", or "that".
</p>
<H2>Input</H2>
<p>
Input consists of several datasets. Each dataset consists of texts in a line. Input ends with EOF. The text consists of lower-case letters, periods, space, and end-of-lines. Only the letters have been encrypted. A line consists of at most 80 characters.
</p>
<p>
You may assume that you can create one decoded text which includes any of "the", "this", or "that" from the given input text.
</p>
<p>
The number of datasets is less than or equal to 20.
</p>
<H2>Output</H2>
<p>
Print decoded texts in a line.
</p>
<H2>Sample Input</H2>
<pre>
xlmw mw xli tmgxyvi xlex m xsso mr xli xvmt.
</pre>
<H2>Output for the Sample Input</H2>
<pre>
this is the picture that i took in the trip.
</pre>
|
s415706916 | p00017 | Wrong Answer | # -*- coding: utf-8 -*-
import sys
import os
from math import sin, cos
import math
alphabet = 'abcdefghijklmnopqrstuvwxyz'
def rotate_char(c, num):
if c == ' ' or c == '.':
return c
n = ord(c) + num
if n > 122:
n -= 26
return chr(n)
def rotate_string(s, num):
ret = []
for c in s:
new_c = rotate_char(c, num)
ret.append(new_c)
return ''.join(ret)
s = input().strip()
for i in range(1, 26):
rotated = rotate_string(s, i)
if 'the' in rotated or 'this' in rotated or 'that' in rotated:
print(rotated)
break | xlmw mw xli tmgxyvi xlex m xsso mr xli xvmt.
| this is the picture that i took in the trip.
|
<H1>Caesar Cipher</H1>
<p>
In cryptography, Caesar cipher is one of the simplest and most widely known encryption method. Caesar cipher is a type of substitution cipher in which each letter in the text is replaced by a letter some fixed number of positions down the alphabet. For example, with a shift of 1, 'a' would be replaced by 'b', 'b' would become 'c', 'y' would become 'z', 'z' would become 'a', and so on. In that case, a text:
<pre>
this is a pen
</pre>
<p>
is would become:
</p>
<pre>
uijt jt b qfo
</pre>
<p>
Write a program which reads a text encrypted by Caesar Chipher and prints the corresponding decoded text. The number of shift is secret and it depends on datasets, but you can assume that the decoded text includes any of the following words: "the", "this", or "that".
</p>
<H2>Input</H2>
<p>
Input consists of several datasets. Each dataset consists of texts in a line. Input ends with EOF. The text consists of lower-case letters, periods, space, and end-of-lines. Only the letters have been encrypted. A line consists of at most 80 characters.
</p>
<p>
You may assume that you can create one decoded text which includes any of "the", "this", or "that" from the given input text.
</p>
<p>
The number of datasets is less than or equal to 20.
</p>
<H2>Output</H2>
<p>
Print decoded texts in a line.
</p>
<H2>Sample Input</H2>
<pre>
xlmw mw xli tmgxyvi xlex m xsso mr xli xvmt.
</pre>
<H2>Output for the Sample Input</H2>
<pre>
this is the picture that i took in the trip.
</pre>
|
s104630973 | p00017 | Wrong Answer | # -*- coding: utf-8 -*-
import sys
import os
from math import sin, cos
import math
alphabet = 'abcdefghijklmnopqrstuvwxyz'
def rotate_char(c, num):
if c == ' ' or c == '.':
return c
n = ord(c) + num
if n > 122:
n -= 26
return chr(n)
def rotate_string(s, num):
ret = []
for c in s:
new_c = rotate_char(c, num)
ret.append(new_c)
return ''.join(ret)
s = input().strip()
for i in range(1, 26):
rotated = rotate_string(s, i)
if 'the' in rotated or 'this' in rotated or 'that' in rotated:
print(rotated, end='')
break | xlmw mw xli tmgxyvi xlex m xsso mr xli xvmt.
| this is the picture that i took in the trip.
|
<H1>Caesar Cipher</H1>
<p>
In cryptography, Caesar cipher is one of the simplest and most widely known encryption method. Caesar cipher is a type of substitution cipher in which each letter in the text is replaced by a letter some fixed number of positions down the alphabet. For example, with a shift of 1, 'a' would be replaced by 'b', 'b' would become 'c', 'y' would become 'z', 'z' would become 'a', and so on. In that case, a text:
<pre>
this is a pen
</pre>
<p>
is would become:
</p>
<pre>
uijt jt b qfo
</pre>
<p>
Write a program which reads a text encrypted by Caesar Chipher and prints the corresponding decoded text. The number of shift is secret and it depends on datasets, but you can assume that the decoded text includes any of the following words: "the", "this", or "that".
</p>
<H2>Input</H2>
<p>
Input consists of several datasets. Each dataset consists of texts in a line. Input ends with EOF. The text consists of lower-case letters, periods, space, and end-of-lines. Only the letters have been encrypted. A line consists of at most 80 characters.
</p>
<p>
You may assume that you can create one decoded text which includes any of "the", "this", or "that" from the given input text.
</p>
<p>
The number of datasets is less than or equal to 20.
</p>
<H2>Output</H2>
<p>
Print decoded texts in a line.
</p>
<H2>Sample Input</H2>
<pre>
xlmw mw xli tmgxyvi xlex m xsso mr xli xvmt.
</pre>
<H2>Output for the Sample Input</H2>
<pre>
this is the picture that i took in the trip.
</pre>
|
s519284405 | p00017 | Wrong Answer | # -*- coding: utf-8 -*-
import sys
import os
from math import sin, cos
import math
alphabet = 'abcdefghijklmnopqrstuvwxyz'
def rotate_char(c, num):
if c == ' ' or c == '.' or c == '\n':
return c
n = ord(c) + num
if n > 122:
n -= 26
return chr(n)
def rotate_string(s, num):
ret = []
for c in s:
new_c = rotate_char(c, num)
ret.append(new_c)
return ''.join(ret)
s = input().strip()
for i in range(1, 26):
rotated = rotate_string(s, i)
if 'the' in rotated or 'this' in rotated or 'that' in rotated:
print(rotated, end='')
break | xlmw mw xli tmgxyvi xlex m xsso mr xli xvmt.
| this is the picture that i took in the trip.
|
<H1>Caesar Cipher</H1>
<p>
In cryptography, Caesar cipher is one of the simplest and most widely known encryption method. Caesar cipher is a type of substitution cipher in which each letter in the text is replaced by a letter some fixed number of positions down the alphabet. For example, with a shift of 1, 'a' would be replaced by 'b', 'b' would become 'c', 'y' would become 'z', 'z' would become 'a', and so on. In that case, a text:
<pre>
this is a pen
</pre>
<p>
is would become:
</p>
<pre>
uijt jt b qfo
</pre>
<p>
Write a program which reads a text encrypted by Caesar Chipher and prints the corresponding decoded text. The number of shift is secret and it depends on datasets, but you can assume that the decoded text includes any of the following words: "the", "this", or "that".
</p>
<H2>Input</H2>
<p>
Input consists of several datasets. Each dataset consists of texts in a line. Input ends with EOF. The text consists of lower-case letters, periods, space, and end-of-lines. Only the letters have been encrypted. A line consists of at most 80 characters.
</p>
<p>
You may assume that you can create one decoded text which includes any of "the", "this", or "that" from the given input text.
</p>
<p>
The number of datasets is less than or equal to 20.
</p>
<H2>Output</H2>
<p>
Print decoded texts in a line.
</p>
<H2>Sample Input</H2>
<pre>
xlmw mw xli tmgxyvi xlex m xsso mr xli xvmt.
</pre>
<H2>Output for the Sample Input</H2>
<pre>
this is the picture that i took in the trip.
</pre>
|
s160640261 | p00017 | Wrong Answer | # -*- coding: utf-8 -*-
import sys
import os
from math import sin, cos
import math
alphabet = 'abcdefghijklmnopqrstuvwxyz'
def rotate_char(c, num):
if c == ' ' or c == '.' or c == '\n':
return c
n = ord(c) + num
if n > 122:
n -= 26
return chr(n)
def rotate_string(s, num):
ret = []
for c in s:
new_c = rotate_char(c, num)
ret.append(new_c)
return ''.join(ret)
s = input()
for i in range(1, 26):
rotated = rotate_string(s, i)
if 'the' in rotated or 'this' in rotated or 'that' in rotated:
print(rotated, end='')
break | xlmw mw xli tmgxyvi xlex m xsso mr xli xvmt.
| this is the picture that i took in the trip.
|
<H1>Caesar Cipher</H1>
<p>
In cryptography, Caesar cipher is one of the simplest and most widely known encryption method. Caesar cipher is a type of substitution cipher in which each letter in the text is replaced by a letter some fixed number of positions down the alphabet. For example, with a shift of 1, 'a' would be replaced by 'b', 'b' would become 'c', 'y' would become 'z', 'z' would become 'a', and so on. In that case, a text:
<pre>
this is a pen
</pre>
<p>
is would become:
</p>
<pre>
uijt jt b qfo
</pre>
<p>
Write a program which reads a text encrypted by Caesar Chipher and prints the corresponding decoded text. The number of shift is secret and it depends on datasets, but you can assume that the decoded text includes any of the following words: "the", "this", or "that".
</p>
<H2>Input</H2>
<p>
Input consists of several datasets. Each dataset consists of texts in a line. Input ends with EOF. The text consists of lower-case letters, periods, space, and end-of-lines. Only the letters have been encrypted. A line consists of at most 80 characters.
</p>
<p>
You may assume that you can create one decoded text which includes any of "the", "this", or "that" from the given input text.
</p>
<p>
The number of datasets is less than or equal to 20.
</p>
<H2>Output</H2>
<p>
Print decoded texts in a line.
</p>
<H2>Sample Input</H2>
<pre>
xlmw mw xli tmgxyvi xlex m xsso mr xli xvmt.
</pre>
<H2>Output for the Sample Input</H2>
<pre>
this is the picture that i took in the trip.
</pre>
|
s157838438 | p00017 | Wrong Answer | # -*- coding: utf-8 -*-
import sys
import os
from math import sin, cos
import math
alphabet = 'abcdefghijklmnopqrstuvwxyz'
def rotate_char(c, num):
if c == ' ' or c == '.' or c == '\n':
return c
n = ord(c) + num
if n > 122:
n -= 26
return chr(n)
def rotate_string(s, num):
ret = []
for c in s:
new_c = rotate_char(c, num)
ret.append(new_c)
return ''.join(ret)
for s in sys.stdin:
for i in range(1, 26):
rotated = rotate_string(s, i)
if 'the' in rotated or 'this' in rotated or 'that' in rotated:
print(rotated, end='')
break | xlmw mw xli tmgxyvi xlex m xsso mr xli xvmt.
| this is the picture that i took in the trip.
|
<H1>Caesar Cipher</H1>
<p>
In cryptography, Caesar cipher is one of the simplest and most widely known encryption method. Caesar cipher is a type of substitution cipher in which each letter in the text is replaced by a letter some fixed number of positions down the alphabet. For example, with a shift of 1, 'a' would be replaced by 'b', 'b' would become 'c', 'y' would become 'z', 'z' would become 'a', and so on. In that case, a text:
<pre>
this is a pen
</pre>
<p>
is would become:
</p>
<pre>
uijt jt b qfo
</pre>
<p>
Write a program which reads a text encrypted by Caesar Chipher and prints the corresponding decoded text. The number of shift is secret and it depends on datasets, but you can assume that the decoded text includes any of the following words: "the", "this", or "that".
</p>
<H2>Input</H2>
<p>
Input consists of several datasets. Each dataset consists of texts in a line. Input ends with EOF. The text consists of lower-case letters, periods, space, and end-of-lines. Only the letters have been encrypted. A line consists of at most 80 characters.
</p>
<p>
You may assume that you can create one decoded text which includes any of "the", "this", or "that" from the given input text.
</p>
<p>
The number of datasets is less than or equal to 20.
</p>
<H2>Output</H2>
<p>
Print decoded texts in a line.
</p>
<H2>Sample Input</H2>
<pre>
xlmw mw xli tmgxyvi xlex m xsso mr xli xvmt.
</pre>
<H2>Output for the Sample Input</H2>
<pre>
this is the picture that i took in the trip.
</pre>
|
s715177559 | p00017 | Wrong Answer | def restore(n,text):
text_list=list(text)
for i,j in enumerate(text_list):
if ord(j)!=46 and ord(j)!=32:
nw=ord(j)-n
if nw<97:
nw=ord(j)-n+26
text_list[i]=chr(nw)
for i in text_list:
print(i,end='')
print('\n')
def textsa(str):
str_list=list(str)
n=len(str_list)
sa=[]
for i in range(n-1):
sa.append((ord(str_list[i+1])-ord(str_list[i]))%26)
sa.append((ord(str_list[0])-ord(str_list[n-1]))%26)
return sa
text=input()
str=list(map(str,text.split()))
for i in str:
if textsa(i)==[14,1,10,1] or textsa(i)==[14,19,19,0]:
n=ord(list(i)[0])-ord('t')
if textsa(i)==[14,23,15]:
n=ord(list(i)[0])-ord('t')
restore(n,text) | xlmw mw xli tmgxyvi xlex m xsso mr xli xvmt.
| this is the picture that i took in the trip.
|
<H1>Caesar Cipher</H1>
<p>
In cryptography, Caesar cipher is one of the simplest and most widely known encryption method. Caesar cipher is a type of substitution cipher in which each letter in the text is replaced by a letter some fixed number of positions down the alphabet. For example, with a shift of 1, 'a' would be replaced by 'b', 'b' would become 'c', 'y' would become 'z', 'z' would become 'a', and so on. In that case, a text:
<pre>
this is a pen
</pre>
<p>
is would become:
</p>
<pre>
uijt jt b qfo
</pre>
<p>
Write a program which reads a text encrypted by Caesar Chipher and prints the corresponding decoded text. The number of shift is secret and it depends on datasets, but you can assume that the decoded text includes any of the following words: "the", "this", or "that".
</p>
<H2>Input</H2>
<p>
Input consists of several datasets. Each dataset consists of texts in a line. Input ends with EOF. The text consists of lower-case letters, periods, space, and end-of-lines. Only the letters have been encrypted. A line consists of at most 80 characters.
</p>
<p>
You may assume that you can create one decoded text which includes any of "the", "this", or "that" from the given input text.
</p>
<p>
The number of datasets is less than or equal to 20.
</p>
<H2>Output</H2>
<p>
Print decoded texts in a line.
</p>
<H2>Sample Input</H2>
<pre>
xlmw mw xli tmgxyvi xlex m xsso mr xli xvmt.
</pre>
<H2>Output for the Sample Input</H2>
<pre>
this is the picture that i took in the trip.
</pre>
|
s276744755 | p00017 | Wrong Answer | def restore(n,text):
text_list=list(text)
for i,j in enumerate(text_list):
if ord(j)!=46 and ord(j)!=32:
nw=ord(j)-n
if nw<97:
nw=ord(j)-n+26
text_list[i]=chr(nw)
print(''.join(map(str,text_list)))
def textsa(text):
str_list=list(text)
n=len(str_list)
sa=[]
for i in range(n-1):
sa.append((ord(str_list[i+1])-ord(str_list[i]))%26)
sa.append((ord(str_list[0])-ord(str_list[n-1]))%26)
return sa
while True:
try:
text=input()
wordlist=list(map(str,text.split()))
for i in wordlist:
if textsa(i)==[14,1,10,1] or textsa(i)==[14,19,19,0] or textsa(i)==[14,23,15]:
n=ord(list(i)[0])-ord('t')
restore(n,text)
except:
break | xlmw mw xli tmgxyvi xlex m xsso mr xli xvmt.
| this is the picture that i took in the trip.
|
<H1>Caesar Cipher</H1>
<p>
In cryptography, Caesar cipher is one of the simplest and most widely known encryption method. Caesar cipher is a type of substitution cipher in which each letter in the text is replaced by a letter some fixed number of positions down the alphabet. For example, with a shift of 1, 'a' would be replaced by 'b', 'b' would become 'c', 'y' would become 'z', 'z' would become 'a', and so on. In that case, a text:
<pre>
this is a pen
</pre>
<p>
is would become:
</p>
<pre>
uijt jt b qfo
</pre>
<p>
Write a program which reads a text encrypted by Caesar Chipher and prints the corresponding decoded text. The number of shift is secret and it depends on datasets, but you can assume that the decoded text includes any of the following words: "the", "this", or "that".
</p>
<H2>Input</H2>
<p>
Input consists of several datasets. Each dataset consists of texts in a line. Input ends with EOF. The text consists of lower-case letters, periods, space, and end-of-lines. Only the letters have been encrypted. A line consists of at most 80 characters.
</p>
<p>
You may assume that you can create one decoded text which includes any of "the", "this", or "that" from the given input text.
</p>
<p>
The number of datasets is less than or equal to 20.
</p>
<H2>Output</H2>
<p>
Print decoded texts in a line.
</p>
<H2>Sample Input</H2>
<pre>
xlmw mw xli tmgxyvi xlex m xsso mr xli xvmt.
</pre>
<H2>Output for the Sample Input</H2>
<pre>
this is the picture that i took in the trip.
</pre>
|
s378246276 | p00017 | Wrong Answer | import string
import sys
example = string.ascii_lowercase
def make(x, y, z, a, b, c = True) :
if x - a < 0 : y = 26 + (x - a)
else : y = x - a
if x - b < 0 : z = 26 + (z - b)
else : z = x - b
if c != True :
if x - c < 0 : n = 26 + (x - c)
else : n = x - c
if c != 0 : return (example[x] + example[y] + example[z])
else : return (example[x] + example[y] + example[z])
def solve(temp, number) :
new_temp = []
if number > 19 : number = number - 19
else : number = 19 - number
for _ in temp :
if _ == ' ' or _ == '.' : new_temp.append(_)
elif _ - number < 0 : new_temp.append(26 + (_ - number))
else : new_temp.append(_ - number)
temp = ''
for _ in new_temp :
if _ == ' ' or _ == '.' : temp += _
else : temp += example[_]
return temp
for input_string in sys.stdin :
test = input_string
temp = []
for _ in test :
if _ == ' ' or _ == '.' : temp.append(_)
elif _ in example : temp.append(example.index(_))
check = 0
the = []
for _ in range(26) : the.append(make(_, _, _, 12, 15))
for number, _ in enumerate(the) :
if _ in test :
print(solve(temp, number))
check = 1
if check == 1 :
this = []
for _ in range(26) : this.append(make(_, _, _, 12, 13, 24))
for number, _ in enumerate(this) :
if _ in test :
print(solve(temp, number))
check = 1
if check == 1 :
that = []
for _ in range(26) : this.append(make(_, _, _, 12, 13, 24))
for number, _ in enumerate(this) :
if _ in test : print(solve(temp, number)) | xlmw mw xli tmgxyvi xlex m xsso mr xli xvmt.
| this is the picture that i took in the trip.
|
<H1>Caesar Cipher</H1>
<p>
In cryptography, Caesar cipher is one of the simplest and most widely known encryption method. Caesar cipher is a type of substitution cipher in which each letter in the text is replaced by a letter some fixed number of positions down the alphabet. For example, with a shift of 1, 'a' would be replaced by 'b', 'b' would become 'c', 'y' would become 'z', 'z' would become 'a', and so on. In that case, a text:
<pre>
this is a pen
</pre>
<p>
is would become:
</p>
<pre>
uijt jt b qfo
</pre>
<p>
Write a program which reads a text encrypted by Caesar Chipher and prints the corresponding decoded text. The number of shift is secret and it depends on datasets, but you can assume that the decoded text includes any of the following words: "the", "this", or "that".
</p>
<H2>Input</H2>
<p>
Input consists of several datasets. Each dataset consists of texts in a line. Input ends with EOF. The text consists of lower-case letters, periods, space, and end-of-lines. Only the letters have been encrypted. A line consists of at most 80 characters.
</p>
<p>
You may assume that you can create one decoded text which includes any of "the", "this", or "that" from the given input text.
</p>
<p>
The number of datasets is less than or equal to 20.
</p>
<H2>Output</H2>
<p>
Print decoded texts in a line.
</p>
<H2>Sample Input</H2>
<pre>
xlmw mw xli tmgxyvi xlex m xsso mr xli xvmt.
</pre>
<H2>Output for the Sample Input</H2>
<pre>
this is the picture that i took in the trip.
</pre>
|
s453776724 | p00017 | Wrong Answer | def main():
words = input().split()
bl = False
for i in range(1,26):
ans = ""
for word in words:
s = ""
for string in word:
os = ord(string)
if os == 46:
s = s + string
else:
if os - i < 97:
s += chr(122 - (97 - (os - i)))
else:
s += chr(os - i)
if s in ("the", "this", "that"):
bl = True
ans += " " + s
if bl:
break
print(ans[1::])
if __name__ == "__main__":
main() | xlmw mw xli tmgxyvi xlex m xsso mr xli xvmt.
| this is the picture that i took in the trip.
|
<H1>Caesar Cipher</H1>
<p>
In cryptography, Caesar cipher is one of the simplest and most widely known encryption method. Caesar cipher is a type of substitution cipher in which each letter in the text is replaced by a letter some fixed number of positions down the alphabet. For example, with a shift of 1, 'a' would be replaced by 'b', 'b' would become 'c', 'y' would become 'z', 'z' would become 'a', and so on. In that case, a text:
<pre>
this is a pen
</pre>
<p>
is would become:
</p>
<pre>
uijt jt b qfo
</pre>
<p>
Write a program which reads a text encrypted by Caesar Chipher and prints the corresponding decoded text. The number of shift is secret and it depends on datasets, but you can assume that the decoded text includes any of the following words: "the", "this", or "that".
</p>
<H2>Input</H2>
<p>
Input consists of several datasets. Each dataset consists of texts in a line. Input ends with EOF. The text consists of lower-case letters, periods, space, and end-of-lines. Only the letters have been encrypted. A line consists of at most 80 characters.
</p>
<p>
You may assume that you can create one decoded text which includes any of "the", "this", or "that" from the given input text.
</p>
<p>
The number of datasets is less than or equal to 20.
</p>
<H2>Output</H2>
<p>
Print decoded texts in a line.
</p>
<H2>Sample Input</H2>
<pre>
xlmw mw xli tmgxyvi xlex m xsso mr xli xvmt.
</pre>
<H2>Output for the Sample Input</H2>
<pre>
this is the picture that i took in the trip.
</pre>
|
s978495736 | p00017 | Wrong Answer | def main():
while True:
try:
words = input().split()
except:
break
bl = False
for i in range(1,26):
ans = ""
for word in words:
s = ""
for string in word:
os = ord(string)
if os == 46:
s = s + string
else:
if os - i < 97:
s += chr(122 - (97 - (os - i)))
else:
s += chr(os - i)
if s in ("the", "this", "that"):
bl = True
ans += " " + s
if bl:
break
print(ans[1::])
if __name__ == "__main__":
main() | xlmw mw xli tmgxyvi xlex m xsso mr xli xvmt.
| this is the picture that i took in the trip.
|
<H1>Caesar Cipher</H1>
<p>
In cryptography, Caesar cipher is one of the simplest and most widely known encryption method. Caesar cipher is a type of substitution cipher in which each letter in the text is replaced by a letter some fixed number of positions down the alphabet. For example, with a shift of 1, 'a' would be replaced by 'b', 'b' would become 'c', 'y' would become 'z', 'z' would become 'a', and so on. In that case, a text:
<pre>
this is a pen
</pre>
<p>
is would become:
</p>
<pre>
uijt jt b qfo
</pre>
<p>
Write a program which reads a text encrypted by Caesar Chipher and prints the corresponding decoded text. The number of shift is secret and it depends on datasets, but you can assume that the decoded text includes any of the following words: "the", "this", or "that".
</p>
<H2>Input</H2>
<p>
Input consists of several datasets. Each dataset consists of texts in a line. Input ends with EOF. The text consists of lower-case letters, periods, space, and end-of-lines. Only the letters have been encrypted. A line consists of at most 80 characters.
</p>
<p>
You may assume that you can create one decoded text which includes any of "the", "this", or "that" from the given input text.
</p>
<p>
The number of datasets is less than or equal to 20.
</p>
<H2>Output</H2>
<p>
Print decoded texts in a line.
</p>
<H2>Sample Input</H2>
<pre>
xlmw mw xli tmgxyvi xlex m xsso mr xli xvmt.
</pre>
<H2>Output for the Sample Input</H2>
<pre>
this is the picture that i took in the trip.
</pre>
|
s810063523 | p00017 | Wrong Answer | def main():
ex =[ord(".")]
while True:
try:
words = input().split()
except:
break
bl = False
for i in range(1,26):
ans = ""
for word in words:
s = ""
for string in word:
os = ord(string)
if os in ex:
s = s + string
else:
if os - i < 97:
s += chr(122 - (97 - (os - i)))
else:
s += chr(os - i)
if s in ("the", "this", "that", "this.", "that."):
bl = True
ans += " " + s
if bl:
break
print(ans[1::])
if __name__ == "__main__":
main() | xlmw mw xli tmgxyvi xlex m xsso mr xli xvmt.
| this is the picture that i took in the trip.
|
<H1>Caesar Cipher</H1>
<p>
In cryptography, Caesar cipher is one of the simplest and most widely known encryption method. Caesar cipher is a type of substitution cipher in which each letter in the text is replaced by a letter some fixed number of positions down the alphabet. For example, with a shift of 1, 'a' would be replaced by 'b', 'b' would become 'c', 'y' would become 'z', 'z' would become 'a', and so on. In that case, a text:
<pre>
this is a pen
</pre>
<p>
is would become:
</p>
<pre>
uijt jt b qfo
</pre>
<p>
Write a program which reads a text encrypted by Caesar Chipher and prints the corresponding decoded text. The number of shift is secret and it depends on datasets, but you can assume that the decoded text includes any of the following words: "the", "this", or "that".
</p>
<H2>Input</H2>
<p>
Input consists of several datasets. Each dataset consists of texts in a line. Input ends with EOF. The text consists of lower-case letters, periods, space, and end-of-lines. Only the letters have been encrypted. A line consists of at most 80 characters.
</p>
<p>
You may assume that you can create one decoded text which includes any of "the", "this", or "that" from the given input text.
</p>
<p>
The number of datasets is less than or equal to 20.
</p>
<H2>Output</H2>
<p>
Print decoded texts in a line.
</p>
<H2>Sample Input</H2>
<pre>
xlmw mw xli tmgxyvi xlex m xsso mr xli xvmt.
</pre>
<H2>Output for the Sample Input</H2>
<pre>
this is the picture that i took in the trip.
</pre>
|
s484540310 | p00017 | Wrong Answer | def main():
ex =[ord(".")]
while True:
try:
words = input().split()
except:
break
bl = False
for i in range(1,26):
ans = ""
for word in words:
s = ""
for string in word:
os = ord(string)
if os in ex:
s = s + string
else:
if os - i < 97:
s += chr(122 - (97 - (os - i)))
else:
s += chr(os - i)
if s in ("the", "this", "that", "the.", "this.", "that."):
bl = True
ans += " " + s
if bl:
break
print(ans[1::])
if __name__ == "__main__":
main() | xlmw mw xli tmgxyvi xlex m xsso mr xli xvmt.
| this is the picture that i took in the trip.
|
<H1>Caesar Cipher</H1>
<p>
In cryptography, Caesar cipher is one of the simplest and most widely known encryption method. Caesar cipher is a type of substitution cipher in which each letter in the text is replaced by a letter some fixed number of positions down the alphabet. For example, with a shift of 1, 'a' would be replaced by 'b', 'b' would become 'c', 'y' would become 'z', 'z' would become 'a', and so on. In that case, a text:
<pre>
this is a pen
</pre>
<p>
is would become:
</p>
<pre>
uijt jt b qfo
</pre>
<p>
Write a program which reads a text encrypted by Caesar Chipher and prints the corresponding decoded text. The number of shift is secret and it depends on datasets, but you can assume that the decoded text includes any of the following words: "the", "this", or "that".
</p>
<H2>Input</H2>
<p>
Input consists of several datasets. Each dataset consists of texts in a line. Input ends with EOF. The text consists of lower-case letters, periods, space, and end-of-lines. Only the letters have been encrypted. A line consists of at most 80 characters.
</p>
<p>
You may assume that you can create one decoded text which includes any of "the", "this", or "that" from the given input text.
</p>
<p>
The number of datasets is less than or equal to 20.
</p>
<H2>Output</H2>
<p>
Print decoded texts in a line.
</p>
<H2>Sample Input</H2>
<pre>
xlmw mw xli tmgxyvi xlex m xsso mr xli xvmt.
</pre>
<H2>Output for the Sample Input</H2>
<pre>
this is the picture that i took in the trip.
</pre>
|
s237489167 | p00017 | Wrong Answer | def main():
ex =[ord(".")]
answer = []
while True:
try:
words = input().split()
except:
break
bl = False
for i in range(1,26):
ans = ""
for word in words:
s = ""
for string in word:
os = ord(string)
if os in ex:
s = s + string
else:
if os - i < 97:
s += chr(122 - (97 - (os - i)))
else:
s += chr(os - i)
if s in ("the", "this", "that", "the.", "this.", "that."):
bl = True
ans += " " + s
if bl:
break
answer.append(ans[1::])
print(*answer, sep="\n")
if __name__ == "__main__":
main() | xlmw mw xli tmgxyvi xlex m xsso mr xli xvmt.
| this is the picture that i took in the trip.
|
<H1>Caesar Cipher</H1>
<p>
In cryptography, Caesar cipher is one of the simplest and most widely known encryption method. Caesar cipher is a type of substitution cipher in which each letter in the text is replaced by a letter some fixed number of positions down the alphabet. For example, with a shift of 1, 'a' would be replaced by 'b', 'b' would become 'c', 'y' would become 'z', 'z' would become 'a', and so on. In that case, a text:
<pre>
this is a pen
</pre>
<p>
is would become:
</p>
<pre>
uijt jt b qfo
</pre>
<p>
Write a program which reads a text encrypted by Caesar Chipher and prints the corresponding decoded text. The number of shift is secret and it depends on datasets, but you can assume that the decoded text includes any of the following words: "the", "this", or "that".
</p>
<H2>Input</H2>
<p>
Input consists of several datasets. Each dataset consists of texts in a line. Input ends with EOF. The text consists of lower-case letters, periods, space, and end-of-lines. Only the letters have been encrypted. A line consists of at most 80 characters.
</p>
<p>
You may assume that you can create one decoded text which includes any of "the", "this", or "that" from the given input text.
</p>
<p>
The number of datasets is less than or equal to 20.
</p>
<H2>Output</H2>
<p>
Print decoded texts in a line.
</p>
<H2>Sample Input</H2>
<pre>
xlmw mw xli tmgxyvi xlex m xsso mr xli xvmt.
</pre>
<H2>Output for the Sample Input</H2>
<pre>
this is the picture that i took in the trip.
</pre>
|
s248654185 | p00017 | Wrong Answer | from sys import stdin
def ascii2num(ascii):
return ord(ascii) - 96
def num2ascii(num):
return chr(num + 96)
def slide(word,num):
return ''.join([num2ascii((ascii2num(ascii) + num) % 26) if ascii != '.' else '.' for ascii in word])
def includekeyword(words):
for word in words:
if word in keywords:
return True
return False
keywords = ['the', 'this', 'that']
decode = []
for row in stdin:
words = row.split()
for num in range(1,27):
tmp = [slide(word,num) for word in words]
print (tmp)
if includekeyword(tmp):
decode = tmp
break | xlmw mw xli tmgxyvi xlex m xsso mr xli xvmt.
| this is the picture that i took in the trip.
|
<H1>Caesar Cipher</H1>
<p>
In cryptography, Caesar cipher is one of the simplest and most widely known encryption method. Caesar cipher is a type of substitution cipher in which each letter in the text is replaced by a letter some fixed number of positions down the alphabet. For example, with a shift of 1, 'a' would be replaced by 'b', 'b' would become 'c', 'y' would become 'z', 'z' would become 'a', and so on. In that case, a text:
<pre>
this is a pen
</pre>
<p>
is would become:
</p>
<pre>
uijt jt b qfo
</pre>
<p>
Write a program which reads a text encrypted by Caesar Chipher and prints the corresponding decoded text. The number of shift is secret and it depends on datasets, but you can assume that the decoded text includes any of the following words: "the", "this", or "that".
</p>
<H2>Input</H2>
<p>
Input consists of several datasets. Each dataset consists of texts in a line. Input ends with EOF. The text consists of lower-case letters, periods, space, and end-of-lines. Only the letters have been encrypted. A line consists of at most 80 characters.
</p>
<p>
You may assume that you can create one decoded text which includes any of "the", "this", or "that" from the given input text.
</p>
<p>
The number of datasets is less than or equal to 20.
</p>
<H2>Output</H2>
<p>
Print decoded texts in a line.
</p>
<H2>Sample Input</H2>
<pre>
xlmw mw xli tmgxyvi xlex m xsso mr xli xvmt.
</pre>
<H2>Output for the Sample Input</H2>
<pre>
this is the picture that i took in the trip.
</pre>
|
s987857010 | p00017 | Wrong Answer | from sys import stdin
def ascii2num(ascii):
return ord(ascii) - 96
def num2ascii(num):
return chr(num + 96)
def slide(word,num):
return ''.join([num2ascii((ascii2num(ascii) + num) % 26) if ascii != '.' else '.' for ascii in word])
def includekeyword(words):
for word in words:
if word in keywords:
return True
return False
keywords = ['the', 'this', 'that']
decode = []
for row in stdin:
words = row.split()
for num in range(1,27):
tmp = [slide(word,num) for word in words]
if includekeyword(tmp):
decode = tmp
print(' '.join(decode)) | xlmw mw xli tmgxyvi xlex m xsso mr xli xvmt.
| this is the picture that i took in the trip.
|
<H1>Caesar Cipher</H1>
<p>
In cryptography, Caesar cipher is one of the simplest and most widely known encryption method. Caesar cipher is a type of substitution cipher in which each letter in the text is replaced by a letter some fixed number of positions down the alphabet. For example, with a shift of 1, 'a' would be replaced by 'b', 'b' would become 'c', 'y' would become 'z', 'z' would become 'a', and so on. In that case, a text:
<pre>
this is a pen
</pre>
<p>
is would become:
</p>
<pre>
uijt jt b qfo
</pre>
<p>
Write a program which reads a text encrypted by Caesar Chipher and prints the corresponding decoded text. The number of shift is secret and it depends on datasets, but you can assume that the decoded text includes any of the following words: "the", "this", or "that".
</p>
<H2>Input</H2>
<p>
Input consists of several datasets. Each dataset consists of texts in a line. Input ends with EOF. The text consists of lower-case letters, periods, space, and end-of-lines. Only the letters have been encrypted. A line consists of at most 80 characters.
</p>
<p>
You may assume that you can create one decoded text which includes any of "the", "this", or "that" from the given input text.
</p>
<p>
The number of datasets is less than or equal to 20.
</p>
<H2>Output</H2>
<p>
Print decoded texts in a line.
</p>
<H2>Sample Input</H2>
<pre>
xlmw mw xli tmgxyvi xlex m xsso mr xli xvmt.
</pre>
<H2>Output for the Sample Input</H2>
<pre>
this is the picture that i took in the trip.
</pre>
|
s448547550 | p00017 | Wrong Answer | from sys import stdin
def ascii2num(ascii):
return ord(ascii) - 96
def num2ascii(num):
return chr(num + 96)
def slide(word,num):
return ''.join([num2ascii((ascii2num(ascii) + num) % 26) if ascii != '.' else '.' for ascii in word])
def includekeyword(words):
for word in words:
if word in keywords:
return True
return False
keywords = ['the', 'this', 'that']
decode = []
for row in stdin:
words = row.split()
for num in range(1,27):
tmp = [slide(word,num) for word in words]
if includekeyword(tmp):
decode = tmp
print(' '.join(decode))
break | xlmw mw xli tmgxyvi xlex m xsso mr xli xvmt.
| this is the picture that i took in the trip.
|
<H1>Caesar Cipher</H1>
<p>
In cryptography, Caesar cipher is one of the simplest and most widely known encryption method. Caesar cipher is a type of substitution cipher in which each letter in the text is replaced by a letter some fixed number of positions down the alphabet. For example, with a shift of 1, 'a' would be replaced by 'b', 'b' would become 'c', 'y' would become 'z', 'z' would become 'a', and so on. In that case, a text:
<pre>
this is a pen
</pre>
<p>
is would become:
</p>
<pre>
uijt jt b qfo
</pre>
<p>
Write a program which reads a text encrypted by Caesar Chipher and prints the corresponding decoded text. The number of shift is secret and it depends on datasets, but you can assume that the decoded text includes any of the following words: "the", "this", or "that".
</p>
<H2>Input</H2>
<p>
Input consists of several datasets. Each dataset consists of texts in a line. Input ends with EOF. The text consists of lower-case letters, periods, space, and end-of-lines. Only the letters have been encrypted. A line consists of at most 80 characters.
</p>
<p>
You may assume that you can create one decoded text which includes any of "the", "this", or "that" from the given input text.
</p>
<p>
The number of datasets is less than or equal to 20.
</p>
<H2>Output</H2>
<p>
Print decoded texts in a line.
</p>
<H2>Sample Input</H2>
<pre>
xlmw mw xli tmgxyvi xlex m xsso mr xli xvmt.
</pre>
<H2>Output for the Sample Input</H2>
<pre>
this is the picture that i took in the trip.
</pre>
|
s549756889 | p00017 | Wrong Answer | import sys
data = sys.stdin.read()
words = list('abcdefghijklmnopqrstuvwxyz')
txt = ''
for sft in range(1,len(words)):
txt = ''.join([words[words.index(c) - len(words) + sft] if c in words else c for c in data])
if 'the' in txt.split(' ') or 'this' in txt.split(' ') or 'that' in txt.split(' '):
break
print(txt) | xlmw mw xli tmgxyvi xlex m xsso mr xli xvmt.
| this is the picture that i took in the trip.
|
<H1>Caesar Cipher</H1>
<p>
In cryptography, Caesar cipher is one of the simplest and most widely known encryption method. Caesar cipher is a type of substitution cipher in which each letter in the text is replaced by a letter some fixed number of positions down the alphabet. For example, with a shift of 1, 'a' would be replaced by 'b', 'b' would become 'c', 'y' would become 'z', 'z' would become 'a', and so on. In that case, a text:
<pre>
this is a pen
</pre>
<p>
is would become:
</p>
<pre>
uijt jt b qfo
</pre>
<p>
Write a program which reads a text encrypted by Caesar Chipher and prints the corresponding decoded text. The number of shift is secret and it depends on datasets, but you can assume that the decoded text includes any of the following words: "the", "this", or "that".
</p>
<H2>Input</H2>
<p>
Input consists of several datasets. Each dataset consists of texts in a line. Input ends with EOF. The text consists of lower-case letters, periods, space, and end-of-lines. Only the letters have been encrypted. A line consists of at most 80 characters.
</p>
<p>
You may assume that you can create one decoded text which includes any of "the", "this", or "that" from the given input text.
</p>
<p>
The number of datasets is less than or equal to 20.
</p>
<H2>Output</H2>
<p>
Print decoded texts in a line.
</p>
<H2>Sample Input</H2>
<pre>
xlmw mw xli tmgxyvi xlex m xsso mr xli xvmt.
</pre>
<H2>Output for the Sample Input</H2>
<pre>
this is the picture that i took in the trip.
</pre>
|
s846703655 | p00017 | Wrong Answer | import sys
data = sys.stdin.read()
words = list('abcdefghijklmnopqrstuvwxyz')
txt = ''
for sft in range(1,len(words)):
txt = ''.join([words[words.index(c) - len(words) + sft] if c in words else c for c in data])
if 'the' in txt.split(' ') or 'this' in txt.split(' ') or 'that' in txt.split(' '):
break
print(txt, end='') | xlmw mw xli tmgxyvi xlex m xsso mr xli xvmt.
| this is the picture that i took in the trip.
|
<H1>Caesar Cipher</H1>
<p>
In cryptography, Caesar cipher is one of the simplest and most widely known encryption method. Caesar cipher is a type of substitution cipher in which each letter in the text is replaced by a letter some fixed number of positions down the alphabet. For example, with a shift of 1, 'a' would be replaced by 'b', 'b' would become 'c', 'y' would become 'z', 'z' would become 'a', and so on. In that case, a text:
<pre>
this is a pen
</pre>
<p>
is would become:
</p>
<pre>
uijt jt b qfo
</pre>
<p>
Write a program which reads a text encrypted by Caesar Chipher and prints the corresponding decoded text. The number of shift is secret and it depends on datasets, but you can assume that the decoded text includes any of the following words: "the", "this", or "that".
</p>
<H2>Input</H2>
<p>
Input consists of several datasets. Each dataset consists of texts in a line. Input ends with EOF. The text consists of lower-case letters, periods, space, and end-of-lines. Only the letters have been encrypted. A line consists of at most 80 characters.
</p>
<p>
You may assume that you can create one decoded text which includes any of "the", "this", or "that" from the given input text.
</p>
<p>
The number of datasets is less than or equal to 20.
</p>
<H2>Output</H2>
<p>
Print decoded texts in a line.
</p>
<H2>Sample Input</H2>
<pre>
xlmw mw xli tmgxyvi xlex m xsso mr xli xvmt.
</pre>
<H2>Output for the Sample Input</H2>
<pre>
this is the picture that i took in the trip.
</pre>
|
s501909846 | p00017 | Wrong Answer | import sys
data = sys.stdin.read()
words = list('abcdefghijklmnopqrstuvwxyz')
txt = ''
for sft in range(0,len(words)):
txt = ''.join([words[words.index(c) - len(words) + sft] if c in words else c for c in data])
if 'the' in txt.split(' ') or 'this' in txt.split(' ') or 'that' in txt.split(' '):
break
print(txt, end='') | xlmw mw xli tmgxyvi xlex m xsso mr xli xvmt.
| this is the picture that i took in the trip.
|
<H1>Caesar Cipher</H1>
<p>
In cryptography, Caesar cipher is one of the simplest and most widely known encryption method. Caesar cipher is a type of substitution cipher in which each letter in the text is replaced by a letter some fixed number of positions down the alphabet. For example, with a shift of 1, 'a' would be replaced by 'b', 'b' would become 'c', 'y' would become 'z', 'z' would become 'a', and so on. In that case, a text:
<pre>
this is a pen
</pre>
<p>
is would become:
</p>
<pre>
uijt jt b qfo
</pre>
<p>
Write a program which reads a text encrypted by Caesar Chipher and prints the corresponding decoded text. The number of shift is secret and it depends on datasets, but you can assume that the decoded text includes any of the following words: "the", "this", or "that".
</p>
<H2>Input</H2>
<p>
Input consists of several datasets. Each dataset consists of texts in a line. Input ends with EOF. The text consists of lower-case letters, periods, space, and end-of-lines. Only the letters have been encrypted. A line consists of at most 80 characters.
</p>
<p>
You may assume that you can create one decoded text which includes any of "the", "this", or "that" from the given input text.
</p>
<p>
The number of datasets is less than or equal to 20.
</p>
<H2>Output</H2>
<p>
Print decoded texts in a line.
</p>
<H2>Sample Input</H2>
<pre>
xlmw mw xli tmgxyvi xlex m xsso mr xli xvmt.
</pre>
<H2>Output for the Sample Input</H2>
<pre>
this is the picture that i took in the trip.
</pre>
|
s073821543 | p00017 | Wrong Answer | import sys
words = list('abcdefghijklmnopqrstuvwxyz')
line = sys.stdin.read()
txt = ''
for sft in range(0,len(words)):
txt = ''.join([words[words.index(c) - len(words) + sft] if c in words else c for c in line])
if 'the' in txt.split() or 'this' in txt.split() or 'that' in txt.split():
break
print(txt) | xlmw mw xli tmgxyvi xlex m xsso mr xli xvmt.
| this is the picture that i took in the trip.
|
<H1>Caesar Cipher</H1>
<p>
In cryptography, Caesar cipher is one of the simplest and most widely known encryption method. Caesar cipher is a type of substitution cipher in which each letter in the text is replaced by a letter some fixed number of positions down the alphabet. For example, with a shift of 1, 'a' would be replaced by 'b', 'b' would become 'c', 'y' would become 'z', 'z' would become 'a', and so on. In that case, a text:
<pre>
this is a pen
</pre>
<p>
is would become:
</p>
<pre>
uijt jt b qfo
</pre>
<p>
Write a program which reads a text encrypted by Caesar Chipher and prints the corresponding decoded text. The number of shift is secret and it depends on datasets, but you can assume that the decoded text includes any of the following words: "the", "this", or "that".
</p>
<H2>Input</H2>
<p>
Input consists of several datasets. Each dataset consists of texts in a line. Input ends with EOF. The text consists of lower-case letters, periods, space, and end-of-lines. Only the letters have been encrypted. A line consists of at most 80 characters.
</p>
<p>
You may assume that you can create one decoded text which includes any of "the", "this", or "that" from the given input text.
</p>
<p>
The number of datasets is less than or equal to 20.
</p>
<H2>Output</H2>
<p>
Print decoded texts in a line.
</p>
<H2>Sample Input</H2>
<pre>
xlmw mw xli tmgxyvi xlex m xsso mr xli xvmt.
</pre>
<H2>Output for the Sample Input</H2>
<pre>
this is the picture that i took in the trip.
</pre>
|
s896065730 | p00017 | Wrong Answer | import sys
def _rot(c, i):
if ord("a") < ord(c) and ord(c) < ord("z"):
return chr((ord(c) - ord("a") + i) % 26 + ord("a"))
if ord("A") < ord(c) and ord(c) < ord("Z"):
return chr((ord(c) - ord("A") + i) % 26 + ord("A"))
return c
def rot(str,i):
g=[_rot(c,i) for c in str]
return "".join(g)
def caesar(str):
for i in range(26):
test = rot(str,i)
if ("this" in test) or ("that" in test) or ("the" in test):
return test
return "nan"
a = []
for line in sys.stdin:
a.append(line.rstrip())
for i in range(len(a)):
print(caesar(a[i])) | xlmw mw xli tmgxyvi xlex m xsso mr xli xvmt.
| this is the picture that i took in the trip.
|
<H1>Caesar Cipher</H1>
<p>
In cryptography, Caesar cipher is one of the simplest and most widely known encryption method. Caesar cipher is a type of substitution cipher in which each letter in the text is replaced by a letter some fixed number of positions down the alphabet. For example, with a shift of 1, 'a' would be replaced by 'b', 'b' would become 'c', 'y' would become 'z', 'z' would become 'a', and so on. In that case, a text:
<pre>
this is a pen
</pre>
<p>
is would become:
</p>
<pre>
uijt jt b qfo
</pre>
<p>
Write a program which reads a text encrypted by Caesar Chipher and prints the corresponding decoded text. The number of shift is secret and it depends on datasets, but you can assume that the decoded text includes any of the following words: "the", "this", or "that".
</p>
<H2>Input</H2>
<p>
Input consists of several datasets. Each dataset consists of texts in a line. Input ends with EOF. The text consists of lower-case letters, periods, space, and end-of-lines. Only the letters have been encrypted. A line consists of at most 80 characters.
</p>
<p>
You may assume that you can create one decoded text which includes any of "the", "this", or "that" from the given input text.
</p>
<p>
The number of datasets is less than or equal to 20.
</p>
<H2>Output</H2>
<p>
Print decoded texts in a line.
</p>
<H2>Sample Input</H2>
<pre>
xlmw mw xli tmgxyvi xlex m xsso mr xli xvmt.
</pre>
<H2>Output for the Sample Input</H2>
<pre>
this is the picture that i took in the trip.
</pre>
|
s380386093 | p00017 | Wrong Answer | import sys
def _rot(c, i):
if ord("a") < ord(c) and ord(c) < ord("z"):
return chr((ord(c) - ord("a") + i) % 26 + ord("a"))
if ord("A") < ord(c) and ord(c) < ord("Z"):
return chr((ord(c) - ord("A") + i) % 26 + ord("A"))
return c
def rot(str,i):
g=[_rot(c,i) for c in str]
return "".join(g)
def caesar(str):
for i in range(26):
test = rot(str,i).split()
if ("this" in test) or ("that" in test) or ("the" in test):
return "".join(test)
return "nan"
a = []
for line in sys.stdin:
a.append(line.rstrip())
for i in range(len(a)):
print(caesar(a[i])) | xlmw mw xli tmgxyvi xlex m xsso mr xli xvmt.
| this is the picture that i took in the trip.
|
<H1>Caesar Cipher</H1>
<p>
In cryptography, Caesar cipher is one of the simplest and most widely known encryption method. Caesar cipher is a type of substitution cipher in which each letter in the text is replaced by a letter some fixed number of positions down the alphabet. For example, with a shift of 1, 'a' would be replaced by 'b', 'b' would become 'c', 'y' would become 'z', 'z' would become 'a', and so on. In that case, a text:
<pre>
this is a pen
</pre>
<p>
is would become:
</p>
<pre>
uijt jt b qfo
</pre>
<p>
Write a program which reads a text encrypted by Caesar Chipher and prints the corresponding decoded text. The number of shift is secret and it depends on datasets, but you can assume that the decoded text includes any of the following words: "the", "this", or "that".
</p>
<H2>Input</H2>
<p>
Input consists of several datasets. Each dataset consists of texts in a line. Input ends with EOF. The text consists of lower-case letters, periods, space, and end-of-lines. Only the letters have been encrypted. A line consists of at most 80 characters.
</p>
<p>
You may assume that you can create one decoded text which includes any of "the", "this", or "that" from the given input text.
</p>
<p>
The number of datasets is less than or equal to 20.
</p>
<H2>Output</H2>
<p>
Print decoded texts in a line.
</p>
<H2>Sample Input</H2>
<pre>
xlmw mw xli tmgxyvi xlex m xsso mr xli xvmt.
</pre>
<H2>Output for the Sample Input</H2>
<pre>
this is the picture that i took in the trip.
</pre>
|
s580021198 | p00017 | Wrong Answer | import sys
def _rot(c, i):
if ord("a") < ord(c) and ord(c) < ord("z"):
return chr((ord(c) - ord("a") + i) % 26 + ord("a"))
if ord("A") < ord(c) and ord(c) < ord("Z"):
return chr((ord(c) - ord("A") + i) % 26 + ord("A"))
return c
def rot(str,i):
g=[_rot(c,i) for c in str]
return "".join(g)
def caesar(str):
for i in range(26):
test = rot(str,i).split()
if ("this" in test) or ("that" in test) or ("the" in test):
return " ".join(test)
return "nan"
a = []
for line in sys.stdin:
a.append(line.rstrip())
for i in range(len(a)):
print(caesar(a[i])) | xlmw mw xli tmgxyvi xlex m xsso mr xli xvmt.
| this is the picture that i took in the trip.
|
<H1>Caesar Cipher</H1>
<p>
In cryptography, Caesar cipher is one of the simplest and most widely known encryption method. Caesar cipher is a type of substitution cipher in which each letter in the text is replaced by a letter some fixed number of positions down the alphabet. For example, with a shift of 1, 'a' would be replaced by 'b', 'b' would become 'c', 'y' would become 'z', 'z' would become 'a', and so on. In that case, a text:
<pre>
this is a pen
</pre>
<p>
is would become:
</p>
<pre>
uijt jt b qfo
</pre>
<p>
Write a program which reads a text encrypted by Caesar Chipher and prints the corresponding decoded text. The number of shift is secret and it depends on datasets, but you can assume that the decoded text includes any of the following words: "the", "this", or "that".
</p>
<H2>Input</H2>
<p>
Input consists of several datasets. Each dataset consists of texts in a line. Input ends with EOF. The text consists of lower-case letters, periods, space, and end-of-lines. Only the letters have been encrypted. A line consists of at most 80 characters.
</p>
<p>
You may assume that you can create one decoded text which includes any of "the", "this", or "that" from the given input text.
</p>
<p>
The number of datasets is less than or equal to 20.
</p>
<H2>Output</H2>
<p>
Print decoded texts in a line.
</p>
<H2>Sample Input</H2>
<pre>
xlmw mw xli tmgxyvi xlex m xsso mr xli xvmt.
</pre>
<H2>Output for the Sample Input</H2>
<pre>
this is the picture that i took in the trip.
</pre>
|
s664641604 | p00017 | Wrong Answer | import sys
def _rot(c, i):
if ord("a") < ord(c) and ord(c) < ord("z"):
return chr((ord(c) - ord("a") + i) % 26 + ord("a"))
if ord("A") < ord(c) and ord(c) < ord("Z"):
return chr((ord(c) - ord("A") + i) % 26 + ord("A"))
return c
def rot(str, i):
g = [_rot(c, i) for c in str]
return "".join(g)
def caesar(str):
for i in range(26):
test = rot(str, i).split()
if ("this" in test) or ("that" in test) or ("the" in test)or("this." in test) or ("that." in test):
return " ".join(test)
return "nan"
a = []
for line in sys.stdin:
a.append(line.rstrip())
for i in range(len(a)):
print(caesar(a[i])) | xlmw mw xli tmgxyvi xlex m xsso mr xli xvmt.
| this is the picture that i took in the trip.
|
<H1>Caesar Cipher</H1>
<p>
In cryptography, Caesar cipher is one of the simplest and most widely known encryption method. Caesar cipher is a type of substitution cipher in which each letter in the text is replaced by a letter some fixed number of positions down the alphabet. For example, with a shift of 1, 'a' would be replaced by 'b', 'b' would become 'c', 'y' would become 'z', 'z' would become 'a', and so on. In that case, a text:
<pre>
this is a pen
</pre>
<p>
is would become:
</p>
<pre>
uijt jt b qfo
</pre>
<p>
Write a program which reads a text encrypted by Caesar Chipher and prints the corresponding decoded text. The number of shift is secret and it depends on datasets, but you can assume that the decoded text includes any of the following words: "the", "this", or "that".
</p>
<H2>Input</H2>
<p>
Input consists of several datasets. Each dataset consists of texts in a line. Input ends with EOF. The text consists of lower-case letters, periods, space, and end-of-lines. Only the letters have been encrypted. A line consists of at most 80 characters.
</p>
<p>
You may assume that you can create one decoded text which includes any of "the", "this", or "that" from the given input text.
</p>
<p>
The number of datasets is less than or equal to 20.
</p>
<H2>Output</H2>
<p>
Print decoded texts in a line.
</p>
<H2>Sample Input</H2>
<pre>
xlmw mw xli tmgxyvi xlex m xsso mr xli xvmt.
</pre>
<H2>Output for the Sample Input</H2>
<pre>
this is the picture that i took in the trip.
</pre>
|
s998230678 | p00017 | Wrong Answer | import sys
def _rot(c, i):
if ord("a") < ord(c) and ord(c) < ord("z"):
return chr((ord(c) - ord("a") + i) % 26 + ord("a"))
if ord("A") < ord(c) and ord(c) < ord("Z"):
return chr((ord(c) - ord("A") + i) % 26 + ord("A"))
return c
def rot(str, i):
g = [_rot(c, i) for c in str]
return "".join(g)
def caesar(str):
for i in range(26):
test = rot(str, i).split()
if ("this" in test) or ("that" in test) or ("the" in test)or("this." in test) or ("that." in test):
return " ".join(test)
return "nan"
a = []
for line in sys.stdin:
a.append(line)
for i in range(len(a)):
print(caesar(a[i])) | xlmw mw xli tmgxyvi xlex m xsso mr xli xvmt.
| this is the picture that i took in the trip.
|
<H1>Caesar Cipher</H1>
<p>
In cryptography, Caesar cipher is one of the simplest and most widely known encryption method. Caesar cipher is a type of substitution cipher in which each letter in the text is replaced by a letter some fixed number of positions down the alphabet. For example, with a shift of 1, 'a' would be replaced by 'b', 'b' would become 'c', 'y' would become 'z', 'z' would become 'a', and so on. In that case, a text:
<pre>
this is a pen
</pre>
<p>
is would become:
</p>
<pre>
uijt jt b qfo
</pre>
<p>
Write a program which reads a text encrypted by Caesar Chipher and prints the corresponding decoded text. The number of shift is secret and it depends on datasets, but you can assume that the decoded text includes any of the following words: "the", "this", or "that".
</p>
<H2>Input</H2>
<p>
Input consists of several datasets. Each dataset consists of texts in a line. Input ends with EOF. The text consists of lower-case letters, periods, space, and end-of-lines. Only the letters have been encrypted. A line consists of at most 80 characters.
</p>
<p>
You may assume that you can create one decoded text which includes any of "the", "this", or "that" from the given input text.
</p>
<p>
The number of datasets is less than or equal to 20.
</p>
<H2>Output</H2>
<p>
Print decoded texts in a line.
</p>
<H2>Sample Input</H2>
<pre>
xlmw mw xli tmgxyvi xlex m xsso mr xli xvmt.
</pre>
<H2>Output for the Sample Input</H2>
<pre>
this is the picture that i took in the trip.
</pre>
|
s367991518 | p00017 | Wrong Answer | import sys
def _rot(c, i):
if ord("a") < ord(c) and ord(c) < ord("z"):
return chr((ord(c) - ord("a") + i) % 26 + ord("a"))
if ord("A") < ord(c) and ord(c) < ord("Z"):
return chr((ord(c) - ord("A") + i) % 26 + ord("A"))
return c
def rot(str, i):
g = [_rot(c, i) for c in str]
return "".join(g)
def caesar(str):
for i in range(26):
test = rot(str, i).split()
if ("this" in test) or ("that" in test) or ("the" in test)or("this." in test) or ("that." in test):
return " ".join(test)
return "nan"
print(caesar(input())) | xlmw mw xli tmgxyvi xlex m xsso mr xli xvmt.
| this is the picture that i took in the trip.
|
<H1>Caesar Cipher</H1>
<p>
In cryptography, Caesar cipher is one of the simplest and most widely known encryption method. Caesar cipher is a type of substitution cipher in which each letter in the text is replaced by a letter some fixed number of positions down the alphabet. For example, with a shift of 1, 'a' would be replaced by 'b', 'b' would become 'c', 'y' would become 'z', 'z' would become 'a', and so on. In that case, a text:
<pre>
this is a pen
</pre>
<p>
is would become:
</p>
<pre>
uijt jt b qfo
</pre>
<p>
Write a program which reads a text encrypted by Caesar Chipher and prints the corresponding decoded text. The number of shift is secret and it depends on datasets, but you can assume that the decoded text includes any of the following words: "the", "this", or "that".
</p>
<H2>Input</H2>
<p>
Input consists of several datasets. Each dataset consists of texts in a line. Input ends with EOF. The text consists of lower-case letters, periods, space, and end-of-lines. Only the letters have been encrypted. A line consists of at most 80 characters.
</p>
<p>
You may assume that you can create one decoded text which includes any of "the", "this", or "that" from the given input text.
</p>
<p>
The number of datasets is less than or equal to 20.
</p>
<H2>Output</H2>
<p>
Print decoded texts in a line.
</p>
<H2>Sample Input</H2>
<pre>
xlmw mw xli tmgxyvi xlex m xsso mr xli xvmt.
</pre>
<H2>Output for the Sample Input</H2>
<pre>
this is the picture that i took in the trip.
</pre>
|
s419849653 | p00017 | Wrong Answer | import sys
def _rot(c, i):
if ord("a") < ord(c) and ord(c) < ord("z"):
return chr((ord(c) - ord("a") + i) % 26 + ord("a"))
if ord("A") < ord(c) and ord(c) < ord("Z"):
return chr((ord(c) - ord("A") + i) % 26 + ord("A"))
return c
def rot(str, i):
g = [_rot(c, i) for c in str]
return "".join(g)
def caesar(str):
test=[]
for i in range(26):
test = rot(str, i).split()
if ("this" in test) or ("that" in test) or ("the" in test)or("this." in test) or ("that." in test):
return " ".join(test)
return "nan"
a = []
for line in sys.stdin:
a.append(line.rstrip())
for i in range(len(a)):
print(caesar(a[i])) | xlmw mw xli tmgxyvi xlex m xsso mr xli xvmt.
| this is the picture that i took in the trip.
|
<H1>Caesar Cipher</H1>
<p>
In cryptography, Caesar cipher is one of the simplest and most widely known encryption method. Caesar cipher is a type of substitution cipher in which each letter in the text is replaced by a letter some fixed number of positions down the alphabet. For example, with a shift of 1, 'a' would be replaced by 'b', 'b' would become 'c', 'y' would become 'z', 'z' would become 'a', and so on. In that case, a text:
<pre>
this is a pen
</pre>
<p>
is would become:
</p>
<pre>
uijt jt b qfo
</pre>
<p>
Write a program which reads a text encrypted by Caesar Chipher and prints the corresponding decoded text. The number of shift is secret and it depends on datasets, but you can assume that the decoded text includes any of the following words: "the", "this", or "that".
</p>
<H2>Input</H2>
<p>
Input consists of several datasets. Each dataset consists of texts in a line. Input ends with EOF. The text consists of lower-case letters, periods, space, and end-of-lines. Only the letters have been encrypted. A line consists of at most 80 characters.
</p>
<p>
You may assume that you can create one decoded text which includes any of "the", "this", or "that" from the given input text.
</p>
<p>
The number of datasets is less than or equal to 20.
</p>
<H2>Output</H2>
<p>
Print decoded texts in a line.
</p>
<H2>Sample Input</H2>
<pre>
xlmw mw xli tmgxyvi xlex m xsso mr xli xvmt.
</pre>
<H2>Output for the Sample Input</H2>
<pre>
this is the picture that i took in the trip.
</pre>
|
s888332549 | p00017 | Wrong Answer | import sys
def _rot(c, i):
if ord("a") < ord(c) and ord(c) < ord("z"):
return chr((ord(c) - ord("a") + i) % 26 + ord("a"))
if ord("A") < ord(c) and ord(c) < ord("Z"):
return chr((ord(c) - ord("A") + i) % 26 + ord("A"))
return c
def rot(str, i):
g = [_rot(c, i) for c in str]
return "".join(g)
def caesar(str):
test=[]
for i in range(27):
test = rot(str, i).split()
if ("this" in test) or ("that" in test) or ("the" in test)or("this." in test) or ("that." in test):
return " ".join(test)
return "nan"
a = []
for line in sys.stdin:
a.append(line.rstrip())
for i in range(len(a)):
print(caesar(a[i])) | xlmw mw xli tmgxyvi xlex m xsso mr xli xvmt.
| this is the picture that i took in the trip.
|
<H1>Caesar Cipher</H1>
<p>
In cryptography, Caesar cipher is one of the simplest and most widely known encryption method. Caesar cipher is a type of substitution cipher in which each letter in the text is replaced by a letter some fixed number of positions down the alphabet. For example, with a shift of 1, 'a' would be replaced by 'b', 'b' would become 'c', 'y' would become 'z', 'z' would become 'a', and so on. In that case, a text:
<pre>
this is a pen
</pre>
<p>
is would become:
</p>
<pre>
uijt jt b qfo
</pre>
<p>
Write a program which reads a text encrypted by Caesar Chipher and prints the corresponding decoded text. The number of shift is secret and it depends on datasets, but you can assume that the decoded text includes any of the following words: "the", "this", or "that".
</p>
<H2>Input</H2>
<p>
Input consists of several datasets. Each dataset consists of texts in a line. Input ends with EOF. The text consists of lower-case letters, periods, space, and end-of-lines. Only the letters have been encrypted. A line consists of at most 80 characters.
</p>
<p>
You may assume that you can create one decoded text which includes any of "the", "this", or "that" from the given input text.
</p>
<p>
The number of datasets is less than or equal to 20.
</p>
<H2>Output</H2>
<p>
Print decoded texts in a line.
</p>
<H2>Sample Input</H2>
<pre>
xlmw mw xli tmgxyvi xlex m xsso mr xli xvmt.
</pre>
<H2>Output for the Sample Input</H2>
<pre>
this is the picture that i took in the trip.
</pre>
|
s357163801 | p00017 | Wrong Answer | import sys
def _rot(c, i):
if ord("a") < ord(c) and ord(c) < ord("z"):
return chr((ord(c) - ord("a") + i) % 26 + ord("a"))
if ord("A") < ord(c) and ord(c) < ord("Z"):
return chr((ord(c) - ord("A") + i) % 26 + ord("A"))
return c
def rot(str, i):
g = [_rot(c, i) for c in str]
return "".join(g)
def caesar(str):
test=[]
for i in range(26):
test = rot(str, i).split()
if ("this" in test) or ("that" in test) or ("the" in test)or("this." in test) or ("that." in test):
return " ".join(test)
return "nan"
a = []
for line in sys.stdin:
a.append(line)
for i in range(len(a)):
print(caesar(a[i])) | xlmw mw xli tmgxyvi xlex m xsso mr xli xvmt.
| this is the picture that i took in the trip.
|
<H1>Caesar Cipher</H1>
<p>
In cryptography, Caesar cipher is one of the simplest and most widely known encryption method. Caesar cipher is a type of substitution cipher in which each letter in the text is replaced by a letter some fixed number of positions down the alphabet. For example, with a shift of 1, 'a' would be replaced by 'b', 'b' would become 'c', 'y' would become 'z', 'z' would become 'a', and so on. In that case, a text:
<pre>
this is a pen
</pre>
<p>
is would become:
</p>
<pre>
uijt jt b qfo
</pre>
<p>
Write a program which reads a text encrypted by Caesar Chipher and prints the corresponding decoded text. The number of shift is secret and it depends on datasets, but you can assume that the decoded text includes any of the following words: "the", "this", or "that".
</p>
<H2>Input</H2>
<p>
Input consists of several datasets. Each dataset consists of texts in a line. Input ends with EOF. The text consists of lower-case letters, periods, space, and end-of-lines. Only the letters have been encrypted. A line consists of at most 80 characters.
</p>
<p>
You may assume that you can create one decoded text which includes any of "the", "this", or "that" from the given input text.
</p>
<p>
The number of datasets is less than or equal to 20.
</p>
<H2>Output</H2>
<p>
Print decoded texts in a line.
</p>
<H2>Sample Input</H2>
<pre>
xlmw mw xli tmgxyvi xlex m xsso mr xli xvmt.
</pre>
<H2>Output for the Sample Input</H2>
<pre>
this is the picture that i took in the trip.
</pre>
|
s008396496 | p00017 | Wrong Answer | import sys
def _rot(c, i):
if ord("a") < ord(c) and ord(c) < ord("z"):
return chr((ord(c) - ord("a") + i) % 26 + ord("a"))
if ord("A") < ord(c) and ord(c) < ord("Z"):
return chr((ord(c) - ord("A") + i) % 26 + ord("A"))
return c
def rot(str, i):
g = [_rot(c, i) for c in str]
return "".join(g)
def caesar(str):
test=[]
for i in range(26):
test = rot(str, i).split()
if ("this" in test) or ("that" in test) or ("the" in test)or("this." in test) or ("that." in test):
return " ".join(test)
a = []
for line in sys.stdin:
a.append(line)
for i in range(len(a)):
print(caesar(a[i])) | xlmw mw xli tmgxyvi xlex m xsso mr xli xvmt.
| this is the picture that i took in the trip.
|
<H1>Caesar Cipher</H1>
<p>
In cryptography, Caesar cipher is one of the simplest and most widely known encryption method. Caesar cipher is a type of substitution cipher in which each letter in the text is replaced by a letter some fixed number of positions down the alphabet. For example, with a shift of 1, 'a' would be replaced by 'b', 'b' would become 'c', 'y' would become 'z', 'z' would become 'a', and so on. In that case, a text:
<pre>
this is a pen
</pre>
<p>
is would become:
</p>
<pre>
uijt jt b qfo
</pre>
<p>
Write a program which reads a text encrypted by Caesar Chipher and prints the corresponding decoded text. The number of shift is secret and it depends on datasets, but you can assume that the decoded text includes any of the following words: "the", "this", or "that".
</p>
<H2>Input</H2>
<p>
Input consists of several datasets. Each dataset consists of texts in a line. Input ends with EOF. The text consists of lower-case letters, periods, space, and end-of-lines. Only the letters have been encrypted. A line consists of at most 80 characters.
</p>
<p>
You may assume that you can create one decoded text which includes any of "the", "this", or "that" from the given input text.
</p>
<p>
The number of datasets is less than or equal to 20.
</p>
<H2>Output</H2>
<p>
Print decoded texts in a line.
</p>
<H2>Sample Input</H2>
<pre>
xlmw mw xli tmgxyvi xlex m xsso mr xli xvmt.
</pre>
<H2>Output for the Sample Input</H2>
<pre>
this is the picture that i took in the trip.
</pre>
|
s679587908 | p00017 | Wrong Answer | import sys
def _rot(c, i):
if ord("a") < ord(c) and ord(c) < ord("z"):
return chr((ord(c) - ord("a") + i) % 26 + ord("a"))
if ord("A") < ord(c) and ord(c) < ord("Z"):
return chr((ord(c) - ord("A") + i) % 26 + ord("A"))
return c
def rot(str, i):
g = [_rot(c, i) for c in str]
return "".join(g)
def caesar(str):
test=[]
for i in range(26):
test = rot(str, i).split()
if ("this" in test) or ("that" in test) or ("the" in test)or("this." in test) or ("that." in test):
return " ".join(test)
for line in sys.stdin:
print(caesar(line)) | xlmw mw xli tmgxyvi xlex m xsso mr xli xvmt.
| this is the picture that i took in the trip.
|
<H1>Caesar Cipher</H1>
<p>
In cryptography, Caesar cipher is one of the simplest and most widely known encryption method. Caesar cipher is a type of substitution cipher in which each letter in the text is replaced by a letter some fixed number of positions down the alphabet. For example, with a shift of 1, 'a' would be replaced by 'b', 'b' would become 'c', 'y' would become 'z', 'z' would become 'a', and so on. In that case, a text:
<pre>
this is a pen
</pre>
<p>
is would become:
</p>
<pre>
uijt jt b qfo
</pre>
<p>
Write a program which reads a text encrypted by Caesar Chipher and prints the corresponding decoded text. The number of shift is secret and it depends on datasets, but you can assume that the decoded text includes any of the following words: "the", "this", or "that".
</p>
<H2>Input</H2>
<p>
Input consists of several datasets. Each dataset consists of texts in a line. Input ends with EOF. The text consists of lower-case letters, periods, space, and end-of-lines. Only the letters have been encrypted. A line consists of at most 80 characters.
</p>
<p>
You may assume that you can create one decoded text which includes any of "the", "this", or "that" from the given input text.
</p>
<p>
The number of datasets is less than or equal to 20.
</p>
<H2>Output</H2>
<p>
Print decoded texts in a line.
</p>
<H2>Sample Input</H2>
<pre>
xlmw mw xli tmgxyvi xlex m xsso mr xli xvmt.
</pre>
<H2>Output for the Sample Input</H2>
<pre>
this is the picture that i took in the trip.
</pre>
|
s965949228 | p00017 | Wrong Answer | import sys
def _rot(c, i):
if ord("a") < ord(c) and ord(c) < ord("z"):
return chr((ord(c) - ord("a") + i) % 26 + ord("a"))
if ord("A") < ord(c) and ord(c) < ord("Z"):
return chr((ord(c) - ord("A") + i) % 26 + ord("A"))
return c
def rot(str, i):
g = [_rot(c, i) for c in str]
return "".join(g)
def caesar(str):
for i in range(26):
s=rot(str, i)
if s.find("this")!=-1 or s.find("the")!=-1 or s.find("that")!=-1:
return s
return 'none'
a = []
for line in sys.stdin:
a.append(line)
for i in range(len(a)):
print(caesar(a[i])) | xlmw mw xli tmgxyvi xlex m xsso mr xli xvmt.
| this is the picture that i took in the trip.
|
<H1>Caesar Cipher</H1>
<p>
In cryptography, Caesar cipher is one of the simplest and most widely known encryption method. Caesar cipher is a type of substitution cipher in which each letter in the text is replaced by a letter some fixed number of positions down the alphabet. For example, with a shift of 1, 'a' would be replaced by 'b', 'b' would become 'c', 'y' would become 'z', 'z' would become 'a', and so on. In that case, a text:
<pre>
this is a pen
</pre>
<p>
is would become:
</p>
<pre>
uijt jt b qfo
</pre>
<p>
Write a program which reads a text encrypted by Caesar Chipher and prints the corresponding decoded text. The number of shift is secret and it depends on datasets, but you can assume that the decoded text includes any of the following words: "the", "this", or "that".
</p>
<H2>Input</H2>
<p>
Input consists of several datasets. Each dataset consists of texts in a line. Input ends with EOF. The text consists of lower-case letters, periods, space, and end-of-lines. Only the letters have been encrypted. A line consists of at most 80 characters.
</p>
<p>
You may assume that you can create one decoded text which includes any of "the", "this", or "that" from the given input text.
</p>
<p>
The number of datasets is less than or equal to 20.
</p>
<H2>Output</H2>
<p>
Print decoded texts in a line.
</p>
<H2>Sample Input</H2>
<pre>
xlmw mw xli tmgxyvi xlex m xsso mr xli xvmt.
</pre>
<H2>Output for the Sample Input</H2>
<pre>
this is the picture that i took in the trip.
</pre>
|
s241850910 | p00017 | Wrong Answer | import sys
def _rot(c, i):
if ord("a") < ord(c) and ord(c) < ord("z"):
return chr((ord(c) - ord("a") + i) % 26 + ord("a"))
if ord("A") < ord(c) and ord(c) < ord("Z"):
return chr((ord(c) - ord("A") + i) % 26 + ord("A"))
return c
def rot(str, i):
g = [_rot(c, i) for c in str]
return "".join(g)
def caesar(str):
for i in range(26):
s=rot(str, i)
if s.find("this")!=-1 or s.find("the")!=-1 or s.find("that")!=-1:
return s
return 'none'
a = []
for line in sys.stdin:
a.append(line.rstrip())
for i in range(len(a)):
print(caesar(a[i])) | xlmw mw xli tmgxyvi xlex m xsso mr xli xvmt.
| this is the picture that i took in the trip.
|
<H1>Caesar Cipher</H1>
<p>
In cryptography, Caesar cipher is one of the simplest and most widely known encryption method. Caesar cipher is a type of substitution cipher in which each letter in the text is replaced by a letter some fixed number of positions down the alphabet. For example, with a shift of 1, 'a' would be replaced by 'b', 'b' would become 'c', 'y' would become 'z', 'z' would become 'a', and so on. In that case, a text:
<pre>
this is a pen
</pre>
<p>
is would become:
</p>
<pre>
uijt jt b qfo
</pre>
<p>
Write a program which reads a text encrypted by Caesar Chipher and prints the corresponding decoded text. The number of shift is secret and it depends on datasets, but you can assume that the decoded text includes any of the following words: "the", "this", or "that".
</p>
<H2>Input</H2>
<p>
Input consists of several datasets. Each dataset consists of texts in a line. Input ends with EOF. The text consists of lower-case letters, periods, space, and end-of-lines. Only the letters have been encrypted. A line consists of at most 80 characters.
</p>
<p>
You may assume that you can create one decoded text which includes any of "the", "this", or "that" from the given input text.
</p>
<p>
The number of datasets is less than or equal to 20.
</p>
<H2>Output</H2>
<p>
Print decoded texts in a line.
</p>
<H2>Sample Input</H2>
<pre>
xlmw mw xli tmgxyvi xlex m xsso mr xli xvmt.
</pre>
<H2>Output for the Sample Input</H2>
<pre>
this is the picture that i took in the trip.
</pre>
|
s625783242 | p00017 | Wrong Answer | import sys
def _rot(c, i):
if ord("a") < ord(c) and ord(c) < ord("z"):
return chr((ord(c) - ord("a") + i) % 26 + ord("a"))
if ord("A") < ord(c) and ord(c) < ord("Z"):
return chr((ord(c) - ord("A") + i) % 26 + ord("A"))
return c
def rot(str, i):
g = [_rot(c, i) for c in str]
return "".join(g)
def caesar(str):
for i in range(26):
s=rot(str, i)
if s.find("this")!=-1 or s.find("the")!=-1 or s.find("that")!=-1:
return s
return 'none'
for line in sys.stdin:
print(caesar(line.rstrip())) | xlmw mw xli tmgxyvi xlex m xsso mr xli xvmt.
| this is the picture that i took in the trip.
|
<H1>Caesar Cipher</H1>
<p>
In cryptography, Caesar cipher is one of the simplest and most widely known encryption method. Caesar cipher is a type of substitution cipher in which each letter in the text is replaced by a letter some fixed number of positions down the alphabet. For example, with a shift of 1, 'a' would be replaced by 'b', 'b' would become 'c', 'y' would become 'z', 'z' would become 'a', and so on. In that case, a text:
<pre>
this is a pen
</pre>
<p>
is would become:
</p>
<pre>
uijt jt b qfo
</pre>
<p>
Write a program which reads a text encrypted by Caesar Chipher and prints the corresponding decoded text. The number of shift is secret and it depends on datasets, but you can assume that the decoded text includes any of the following words: "the", "this", or "that".
</p>
<H2>Input</H2>
<p>
Input consists of several datasets. Each dataset consists of texts in a line. Input ends with EOF. The text consists of lower-case letters, periods, space, and end-of-lines. Only the letters have been encrypted. A line consists of at most 80 characters.
</p>
<p>
You may assume that you can create one decoded text which includes any of "the", "this", or "that" from the given input text.
</p>
<p>
The number of datasets is less than or equal to 20.
</p>
<H2>Output</H2>
<p>
Print decoded texts in a line.
</p>
<H2>Sample Input</H2>
<pre>
xlmw mw xli tmgxyvi xlex m xsso mr xli xvmt.
</pre>
<H2>Output for the Sample Input</H2>
<pre>
this is the picture that i took in the trip.
</pre>
|
s231285849 | p00017 | Wrong Answer | import sys
def _rot(c, i):
if ord("a") < ord(c) and ord(c) < ord("z"):
return chr((ord(c) - ord("a") + i) % 26 + ord("a"))
if ord("A") < ord(c) and ord(c) < ord("Z"):
return chr((ord(c) - ord("A") + i) % 26 + ord("A"))
return c
def rot(str, i):
g = [_rot(c, i) for c in str]
return "".join(g)
def caesar(str):
for i in range(26):
s=".".join(rot(str, i).split()).split(".")
if "the" in s or "that" in s or "this" in s:
return rot(str,i)
return 'none'
for line in sys.stdin:
print(caesar(line.rstrip())) | xlmw mw xli tmgxyvi xlex m xsso mr xli xvmt.
| this is the picture that i took in the trip.
|
<H1>Caesar Cipher</H1>
<p>
In cryptography, Caesar cipher is one of the simplest and most widely known encryption method. Caesar cipher is a type of substitution cipher in which each letter in the text is replaced by a letter some fixed number of positions down the alphabet. For example, with a shift of 1, 'a' would be replaced by 'b', 'b' would become 'c', 'y' would become 'z', 'z' would become 'a', and so on. In that case, a text:
<pre>
this is a pen
</pre>
<p>
is would become:
</p>
<pre>
uijt jt b qfo
</pre>
<p>
Write a program which reads a text encrypted by Caesar Chipher and prints the corresponding decoded text. The number of shift is secret and it depends on datasets, but you can assume that the decoded text includes any of the following words: "the", "this", or "that".
</p>
<H2>Input</H2>
<p>
Input consists of several datasets. Each dataset consists of texts in a line. Input ends with EOF. The text consists of lower-case letters, periods, space, and end-of-lines. Only the letters have been encrypted. A line consists of at most 80 characters.
</p>
<p>
You may assume that you can create one decoded text which includes any of "the", "this", or "that" from the given input text.
</p>
<p>
The number of datasets is less than or equal to 20.
</p>
<H2>Output</H2>
<p>
Print decoded texts in a line.
</p>
<H2>Sample Input</H2>
<pre>
xlmw mw xli tmgxyvi xlex m xsso mr xli xvmt.
</pre>
<H2>Output for the Sample Input</H2>
<pre>
this is the picture that i took in the trip.
</pre>
|
s493603455 | p00017 | Wrong Answer | import sys
def _rot(c, i):
if ord("a") < ord(c) and ord(c) < ord("z"):
return chr((ord(c) - ord("a") + i) % 26 + ord("a"))
if ord("A") < ord(c) and ord(c) < ord("Z"):
return chr((ord(c) - ord("A") + i) % 26 + ord("A"))
return c
def rot(str, i):
g = [_rot(c, i) for c in str]
return "".join(g)
def caesar(str):
for i in range(26):
s=".".join(rot(str, i).split()).split(".")
if "the" in s or "that" in s or "this" in s:
return rot(str,i)
return 'none'
for line in sys.stdin:
print(caesar(line.rstrip()))
while True:
try:
line = input()
if line == '*':
break
except:
break
print(caesar(line)) | xlmw mw xli tmgxyvi xlex m xsso mr xli xvmt.
| this is the picture that i took in the trip.
|
<H1>Caesar Cipher</H1>
<p>
In cryptography, Caesar cipher is one of the simplest and most widely known encryption method. Caesar cipher is a type of substitution cipher in which each letter in the text is replaced by a letter some fixed number of positions down the alphabet. For example, with a shift of 1, 'a' would be replaced by 'b', 'b' would become 'c', 'y' would become 'z', 'z' would become 'a', and so on. In that case, a text:
<pre>
this is a pen
</pre>
<p>
is would become:
</p>
<pre>
uijt jt b qfo
</pre>
<p>
Write a program which reads a text encrypted by Caesar Chipher and prints the corresponding decoded text. The number of shift is secret and it depends on datasets, but you can assume that the decoded text includes any of the following words: "the", "this", or "that".
</p>
<H2>Input</H2>
<p>
Input consists of several datasets. Each dataset consists of texts in a line. Input ends with EOF. The text consists of lower-case letters, periods, space, and end-of-lines. Only the letters have been encrypted. A line consists of at most 80 characters.
</p>
<p>
You may assume that you can create one decoded text which includes any of "the", "this", or "that" from the given input text.
</p>
<p>
The number of datasets is less than or equal to 20.
</p>
<H2>Output</H2>
<p>
Print decoded texts in a line.
</p>
<H2>Sample Input</H2>
<pre>
xlmw mw xli tmgxyvi xlex m xsso mr xli xvmt.
</pre>
<H2>Output for the Sample Input</H2>
<pre>
this is the picture that i took in the trip.
</pre>
|
s315533210 | p00017 | Wrong Answer | def _rot(c, i):
if ord("a") < ord(c) and ord(c) < ord("z"):
return chr((ord(c) - ord("a") + i) % 26 + ord("a"))
if ord("A") < ord(c) and ord(c) < ord("Z"):
return chr((ord(c) - ord("A") + i) % 26 + ord("A"))
return c
def rot(str, i):
g = [_rot(c, i) for c in str]
return "".join(g)
def caesar(str):
for i in range(26):
s=".".join(rot(str, i).split()).split(".")
if "the" in s or "that" in s or "this" in s:
return rot(str,i)
return 'none'
while True:
try:
line = input()
print(caesar(line))
except:
break | xlmw mw xli tmgxyvi xlex m xsso mr xli xvmt.
| this is the picture that i took in the trip.
|
<H1>Caesar Cipher</H1>
<p>
In cryptography, Caesar cipher is one of the simplest and most widely known encryption method. Caesar cipher is a type of substitution cipher in which each letter in the text is replaced by a letter some fixed number of positions down the alphabet. For example, with a shift of 1, 'a' would be replaced by 'b', 'b' would become 'c', 'y' would become 'z', 'z' would become 'a', and so on. In that case, a text:
<pre>
this is a pen
</pre>
<p>
is would become:
</p>
<pre>
uijt jt b qfo
</pre>
<p>
Write a program which reads a text encrypted by Caesar Chipher and prints the corresponding decoded text. The number of shift is secret and it depends on datasets, but you can assume that the decoded text includes any of the following words: "the", "this", or "that".
</p>
<H2>Input</H2>
<p>
Input consists of several datasets. Each dataset consists of texts in a line. Input ends with EOF. The text consists of lower-case letters, periods, space, and end-of-lines. Only the letters have been encrypted. A line consists of at most 80 characters.
</p>
<p>
You may assume that you can create one decoded text which includes any of "the", "this", or "that" from the given input text.
</p>
<p>
The number of datasets is less than or equal to 20.
</p>
<H2>Output</H2>
<p>
Print decoded texts in a line.
</p>
<H2>Sample Input</H2>
<pre>
xlmw mw xli tmgxyvi xlex m xsso mr xli xvmt.
</pre>
<H2>Output for the Sample Input</H2>
<pre>
this is the picture that i took in the trip.
</pre>
|
s194541788 | p00017 | Wrong Answer | s = input()
for i in range(26):
ss = ""
for c in s:
if c == ' ' or c == '.':
ss += c
continue
c = ord(c)
c = (c-ord('a')+i)%26+ord('a')
ss += chr(c)
a = ss.split()
if "the" in a or "this" in a or "that" in a:
print(ss)
break | xlmw mw xli tmgxyvi xlex m xsso mr xli xvmt.
| this is the picture that i took in the trip.
|
<H1>Caesar Cipher</H1>
<p>
In cryptography, Caesar cipher is one of the simplest and most widely known encryption method. Caesar cipher is a type of substitution cipher in which each letter in the text is replaced by a letter some fixed number of positions down the alphabet. For example, with a shift of 1, 'a' would be replaced by 'b', 'b' would become 'c', 'y' would become 'z', 'z' would become 'a', and so on. In that case, a text:
<pre>
this is a pen
</pre>
<p>
is would become:
</p>
<pre>
uijt jt b qfo
</pre>
<p>
Write a program which reads a text encrypted by Caesar Chipher and prints the corresponding decoded text. The number of shift is secret and it depends on datasets, but you can assume that the decoded text includes any of the following words: "the", "this", or "that".
</p>
<H2>Input</H2>
<p>
Input consists of several datasets. Each dataset consists of texts in a line. Input ends with EOF. The text consists of lower-case letters, periods, space, and end-of-lines. Only the letters have been encrypted. A line consists of at most 80 characters.
</p>
<p>
You may assume that you can create one decoded text which includes any of "the", "this", or "that" from the given input text.
</p>
<p>
The number of datasets is less than or equal to 20.
</p>
<H2>Output</H2>
<p>
Print decoded texts in a line.
</p>
<H2>Sample Input</H2>
<pre>
xlmw mw xli tmgxyvi xlex m xsso mr xli xvmt.
</pre>
<H2>Output for the Sample Input</H2>
<pre>
this is the picture that i took in the trip.
</pre>
|
s114529774 | p00017 | Wrong Answer | import fileinput
import string
alphabetArray = list(string.ascii_lowercase)
for data in fileinput.input():
for n in range(-25, 26):
replacedStr = data
for i in range(0, 26):
if n > 0:
replacedStr = replacedStr.replace(alphabetArray[i], alphabetArray[(i + n) % 26])
else:
replacedStr = replacedStr.replace(alphabetArray[i], alphabetArray[i + n])
if "this" in replacedStr or "the" in replacedStr or "that" in replacedStr:
print(replacedStr)
break | xlmw mw xli tmgxyvi xlex m xsso mr xli xvmt.
| this is the picture that i took in the trip.
|
<H1>Caesar Cipher</H1>
<p>
In cryptography, Caesar cipher is one of the simplest and most widely known encryption method. Caesar cipher is a type of substitution cipher in which each letter in the text is replaced by a letter some fixed number of positions down the alphabet. For example, with a shift of 1, 'a' would be replaced by 'b', 'b' would become 'c', 'y' would become 'z', 'z' would become 'a', and so on. In that case, a text:
<pre>
this is a pen
</pre>
<p>
is would become:
</p>
<pre>
uijt jt b qfo
</pre>
<p>
Write a program which reads a text encrypted by Caesar Chipher and prints the corresponding decoded text. The number of shift is secret and it depends on datasets, but you can assume that the decoded text includes any of the following words: "the", "this", or "that".
</p>
<H2>Input</H2>
<p>
Input consists of several datasets. Each dataset consists of texts in a line. Input ends with EOF. The text consists of lower-case letters, periods, space, and end-of-lines. Only the letters have been encrypted. A line consists of at most 80 characters.
</p>
<p>
You may assume that you can create one decoded text which includes any of "the", "this", or "that" from the given input text.
</p>
<p>
The number of datasets is less than or equal to 20.
</p>
<H2>Output</H2>
<p>
Print decoded texts in a line.
</p>
<H2>Sample Input</H2>
<pre>
xlmw mw xli tmgxyvi xlex m xsso mr xli xvmt.
</pre>
<H2>Output for the Sample Input</H2>
<pre>
this is the picture that i took in the trip.
</pre>
|
s536721921 | p00017 | Wrong Answer | import fileinput
import string
alphabetArray = list(string.ascii_lowercase)
for data in fileinput.input():
for n in range(-25, 26):
replacedStr = data.replace('\n', '').replace('\r', '')
for i in range(0, 26):
if n > 0:
replacedStr = replacedStr.replace(alphabetArray[i], alphabetArray[(i + n) % 26])
else:
replacedStr = replacedStr.replace(alphabetArray[i], alphabetArray[i + n])
if "this" in replacedStr or "the" in replacedStr or "that" in replacedStr:
print(replacedStr)
break | xlmw mw xli tmgxyvi xlex m xsso mr xli xvmt.
| this is the picture that i took in the trip.
|
<H1>Caesar Cipher</H1>
<p>
In cryptography, Caesar cipher is one of the simplest and most widely known encryption method. Caesar cipher is a type of substitution cipher in which each letter in the text is replaced by a letter some fixed number of positions down the alphabet. For example, with a shift of 1, 'a' would be replaced by 'b', 'b' would become 'c', 'y' would become 'z', 'z' would become 'a', and so on. In that case, a text:
<pre>
this is a pen
</pre>
<p>
is would become:
</p>
<pre>
uijt jt b qfo
</pre>
<p>
Write a program which reads a text encrypted by Caesar Chipher and prints the corresponding decoded text. The number of shift is secret and it depends on datasets, but you can assume that the decoded text includes any of the following words: "the", "this", or "that".
</p>
<H2>Input</H2>
<p>
Input consists of several datasets. Each dataset consists of texts in a line. Input ends with EOF. The text consists of lower-case letters, periods, space, and end-of-lines. Only the letters have been encrypted. A line consists of at most 80 characters.
</p>
<p>
You may assume that you can create one decoded text which includes any of "the", "this", or "that" from the given input text.
</p>
<p>
The number of datasets is less than or equal to 20.
</p>
<H2>Output</H2>
<p>
Print decoded texts in a line.
</p>
<H2>Sample Input</H2>
<pre>
xlmw mw xli tmgxyvi xlex m xsso mr xli xvmt.
</pre>
<H2>Output for the Sample Input</H2>
<pre>
this is the picture that i took in the trip.
</pre>
|
s018312998 | p00017 | Wrong Answer | # Aizu Problem 0017: Caesar Cipher
#
import sys, math, os
# read input:
PYDEV = os.environ.get('PYDEV')
if PYDEV=="True":
sys.stdin = open("sample-input.txt", "rt")
def caesar_decrypt(N, cipher):
text = ""
for char in cipher:
if 'a' <= char <= 'z':
k = (ord(char) - 97 - N) % 26
text += chr(97 + k)
else:
text += char
return text
cipher = input().strip()
for k in range(26):
decrypted = caesar_decrypt(k, cipher)
if "this" in decrypted and "the" in decrypted and "that" in decrypted:
print(decrypted)
break | xlmw mw xli tmgxyvi xlex m xsso mr xli xvmt.
| this is the picture that i took in the trip.
|
<H1>Caesar Cipher</H1>
<p>
In cryptography, Caesar cipher is one of the simplest and most widely known encryption method. Caesar cipher is a type of substitution cipher in which each letter in the text is replaced by a letter some fixed number of positions down the alphabet. For example, with a shift of 1, 'a' would be replaced by 'b', 'b' would become 'c', 'y' would become 'z', 'z' would become 'a', and so on. In that case, a text:
<pre>
this is a pen
</pre>
<p>
is would become:
</p>
<pre>
uijt jt b qfo
</pre>
<p>
Write a program which reads a text encrypted by Caesar Chipher and prints the corresponding decoded text. The number of shift is secret and it depends on datasets, but you can assume that the decoded text includes any of the following words: "the", "this", or "that".
</p>
<H2>Input</H2>
<p>
Input consists of several datasets. Each dataset consists of texts in a line. Input ends with EOF. The text consists of lower-case letters, periods, space, and end-of-lines. Only the letters have been encrypted. A line consists of at most 80 characters.
</p>
<p>
You may assume that you can create one decoded text which includes any of "the", "this", or "that" from the given input text.
</p>
<p>
The number of datasets is less than or equal to 20.
</p>
<H2>Output</H2>
<p>
Print decoded texts in a line.
</p>
<H2>Sample Input</H2>
<pre>
xlmw mw xli tmgxyvi xlex m xsso mr xli xvmt.
</pre>
<H2>Output for the Sample Input</H2>
<pre>
this is the picture that i took in the trip.
</pre>
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.