submission_id
string
problem_id
string
status
string
code
string
input
string
output
string
problem_description
string
s890989397
p00017
Runtime Error
def main(): check_words = ('the', 'this', 'that') caesar_chipher_text = tuple(map(str, input().split())) if __debug__: print(caesar_chipher_text) for i in range(26): after_text = [] flag = False if __debug__: print('['+ str(i) + ']', end='') print('--------------for word in caesar_chipher_text: ---------------') for word in caesar_chipher_text: if __debug__: print(i) print('word: ' + word) after_word = [] for char in word: if __debug__: print(ord(char)) char = slide_char(char, i) after_word.append(char) after_text.append(after_word) if ''.join(after_word) in check_words: if __debug__: print('yes') flag = True if __debug__: print(after_word) if __debug__: print('dubug:', end='') print(after_text) if flag: anser = [] for text in after_text: anser.append(''.join(text)) print(' '.join(anser)) break 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>
s441028988
p00017
Runtime Error
def slide_char(char, num): if char == '.': return char if ord('A') <= ord(char) <= ord('Z'): if (ord(char) + num) <= ord('Z'): return chr(ord(char) + num) else: return chr(ord('A') + ord(char) + num - ord('Z') - 1) else: if (ord(char) + num) <= ord('z'): return chr(ord(char) + num) else: return chr(ord('a') + ord(char) + num - ord('z') - 1) def main(): check_words = ('the', 'this', 'that') caesar_chipher_text = tuple(map(str, input().split())) for i in range(26): after_text = [] flag = False for word in caesar_chipher_text: after_word = [] for char in word: char = slide_char(char, i) after_word.append(char) after_text.append(after_word) if ''.join(after_word) in check_words: flag = True if flag: anser = [] for text in after_text: anser.append(''.join(text)) print(' '.join(anser)) break 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>
s177158952
p00017
Runtime Error
def slide_char(char, num): if char == '.': return char if ord('A') <= ord(char) <= ord('Z'): if (ord(char) + num) <= ord('Z'): return chr(ord(char) + num) else: return chr(ord('A') + ord(char) + num - ord('Z') - 1) else: if (ord(char) + num) <= ord('z'): return chr(ord(char) + num) else: return chr(ord('a') + ord(char) + num - ord('z') - 1) def main(): check_words = ('the', 'this', 'that') caesar_chipher_text = tuple(map(str,raw_ input().split())) for i in range(26): after_text = [] flag = False for word in caesar_chipher_text: after_word = [] for char in word: char = slide_char(char, i) after_word.append(char) after_text.append(after_word) if ''.join(after_word) in check_words: flag = True if flag: anser = [] for text in after_text: anser.append(''.join(text)) print(' '.join(anser)) break 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>
s807204382
p00017
WA: Presentation Error
#!/usr/bin/env python # -*- coding: utf-8 -*- import sys def move(i,string): lis = [] for e in string: if e == "." : lis.append(".") elif e == "\n": lis.append("\n") else: if ord(e)+i > 122: lis.append( chr(ord(e)+i-26) ) else: lis.append( chr(ord(e)+i ) ) st = "".join(lis) if st in ["the","that","this"]: return True else: return False def move2(i,string): lis = [] for e in string: if e == "." : lis.append(".") elif e == "\n": lis.append("\n") elif e == " ": lis.append(" ") else: if ord(e)+i > 122: lis.append( chr(ord(e)+i-26) ) else: lis.append( chr(ord(e)+i ) ) st = "".join(lis) return st for s in sys.stdin: flag = False i = 0 d = map(str , s.split()) for i in range(26): for e in d: if move(i,e): flag = True break if flag: break print move2(i,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>
s565654120
p00017
WA: Presentation Error
import sys def c1(c): alph ="abcdefghijklmnopqrstuvwxyz" if c in alph: return alph[(alph.find(c)+1)%26] else: return c for string in sys.stdin: while True: af_string="" for c in string: af_string+=c1(c) if af_string.find("the")!=-1\ or af_string.find("this")!=-1\ or af_string.find("that")!=-1: break string = af_string print af_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>
s896433080
p00017
WA: Presentation Error
#!/usr/bin/env python #-*- coding:utf-8 -*- import sys import math for s in sys.stdin: for i in range(26): state = list(s) j = 0 for d in state: if 'a' <= d and d <= 'z': state[j] = chr((ord(d) + i - ord('a')) % 26 + ord('a')) elif 'A' <= d and d <= 'Z': state[j] = chr((ord(d) + i - ord('A')) % 26 + ord('A')) j += 1 state = "".join(state) if "the" in state or "this" in state or "that" in state: print(state) 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>
s323945894
p00017
WA: Presentation Error
import string import sys a = string.ascii_lowercase key = str.maketrans(a, a[1:] + a[:1]) for s in sys.stdin: for i in range(1, 27): s = s.translate(key) if 'the' in s or 'this' in s or 'that' in s: break print(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>
s505488823
p00017
WA: Presentation Error
import sys s = "abcdefghijklmnopqrstuvwxyz" for line in sys.stdin: while True: if ("the" in line) or ("this" in line) or ("that" in line): break else: l = [i for i in line] for i in range(len(l)): if l[i] in s: a = s.index(l[i]) l[i] = l[i].replace(l[i],s[(a+1)%26]) line = "".join(l) print(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>
s793515076
p00017
WA: Presentation Error
import sys for line in sys.stdin: for i in range(26): search = "" for idx in line: if 97 <= ord(idx) <= 122: if ord(idx) + i <= 122: search += chr(ord(idx) + i) else: search += chr(ord(idx) + i - 26) else: search += idx if 'the' in search or 'this' in search or 'that' in search: print(search) quit
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>
s584406296
p00017
WA: Presentation Error
import sys for line in sys.stdin: for i in range(26): search = "" for idx in line: if 97 <= ord(idx) <= 122: if ord(idx) + i <= 122: search += chr(ord(idx) + i) else: search += chr(ord(idx) + i - 26) else: search += idx if 'the' in search or 'this' in search or 'that' in search: print(search) else: continue 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>
s717514401
p00017
WA: Presentation Error
import sys import math as mas li="abcdefghijklmnopqrstuvwxyz" for t in sys.stdin: for i in range(30): a=t.translate(str.maketrans(li,li[i:]+li[:i])) if 1+a.find("this") or 1+a.find("that") or 1+a.find("the"): print(a) break #for i in sys.stdin: # a,b=map(int,i.split()) # print(gcd(a,b),lcm(a,b))
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>
s442920854
p00017
WA: Presentation Error
# -*- 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(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>
s212636088
p00017
WA: Presentation Error
import sys, string thelist = ["the", "this", "that"] def s(ch, n): v = "" for c in ch: if c in string.ascii_lowercase: c = chr((ord(c) - ord("a") + int(n)) % 26 + ord("a")) v += c return v for line in sys.stdin: k = line.split(" ") for i in range(26): li = [] for j in k: li.append(s(j, i)) if set(thelist) & set(li): break 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>
s450068455
p00017
WA: Presentation Error
import sys, string thelist = ["the", "this", "that"] def s(ch, n): v = "" for c in ch: if c in string.ascii_lowercase: c = chr((ord(c) - ord("a") + int(n)) % 26 + ord("a")) v += c return v for line in sys.stdin: k = line.split(" ") for i in range(26): li = [] for j in k: li.append(s(j, i)) if set(thelist) & set(li): break print(" ".join(li) + k[-1][-1])
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>
s760153656
p00017
WA: Presentation Error
import sys, string thelist = ["the", "this", "that"] def s(ch, n): v = "" for c in ch: if c in string.ascii_lowercase: c = chr((ord(c) - ord("a") + int(n)) % 26 + ord("a")) v += c return v for line in sys.stdin: for i in range(26): l = "" for j in line: l += s(j, i) if set(thelist) & set(l.split(" ")): break print("".join(l))
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>
s932705343
p00017
WA: Presentation Error
import sys words = list('abcdefghijklmnopqrstuvwxyz') for line in sys.stdin: 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>
s571860773
p00017
WA: Presentation Error
import sys def caesarshift(sentence): abc = "abcdefghijklmnopqrstuvwxyz" bcd = abc[1:] + "a" return sentence.translate(str.maketrans(abc, bcd)) for line in sys.stdin: sentence = line while True: if "the" in sentence or "this" in sentence or "that" in sentence: break sentence = caesarshift(sentence) print(sentence)
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>
s414721283
p00017
WA: Presentation Error
import sys; for line in sys.stdin: if (line.find('the') != -1) | (line.find('this') != -1) | (line.find('that') != -1): print(line); continue; alpha = 'abcdefghijklmnopqrstuvwxyz'; for i in range(1, 26): str = ''; for j in range(len(line) - 1): if ((line[j] == ' ') | (line[j] == '.')): str += line[j]; continue; index = alpha.find(line[j]); str += alpha[(index + i) % 26]; if (str.find('the') != -1) | (str.find('this') != -1) | (str.find('that') != -1): print(str); 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>
s447423386
p00017
WA: Presentation Error
import sys def main(): ex = ["the", "this", "that"] lc = [chr(i) for i in range(97, 97 + 26)] #lowwer case for line in sys.stdin: s = line.split() for i in range(len(s)): a = s[i] cnt = 0 while a not in ex and cnt < 25: a = list(a) for j in range(len(a)): if a[j] == "z": a[j] = "a" elif a[j] == ".": pass else: a[j] = lc[lc.index(a[j]) + 1] hoge = "" for j in a: hoge += j a = hoge cnt += 1 if cnt != 25: break for i in range(len(s)): a = list(s[i]) for j in range(len(a)): if a[j] == ".": pass else: fuga = lc.index(a[j]) + cnt if fuga > 25: a[j] = lc[fuga - 26] else: a[j] = lc[fuga] else: hoge = "" for k in a: hoge += k else: s[i] = hoge for i in s: print(i, end = " ") print() 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>
s759413128
p00017
WA: Presentation Error
import sys def main(): ex = ["the", "this", "that"] lc = [chr(i) for i in range(97, 97 + 26)] #lowwer case for line in sys.stdin: s = line.split() for i in range(len(s)): a = s[i] cnt = 0 while a not in ex and cnt < 25: a = list(a) for j in range(len(a)): if a[j] == "z": a[j] = "a" elif a[j] == ".": pass else: a[j] = lc[lc.index(a[j]) + 1] hoge = "" for j in a: hoge += j a = hoge cnt += 1 if cnt != 25: break for i in range(len(s)): a = list(s[i]) for j in range(len(a)): if a[j] == ".": pass else: fuga = lc.index(a[j]) + cnt if fuga > 25: a[j] = lc[fuga - 26] else: a[j] = lc[fuga] else: hoge = "" for k in a: hoge += k else: s[i] = hoge for i in s: print(i, end = " ") print() print() 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>
s099333225
p00017
WA: Presentation Error
# 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 for cipher in sys.stdin: for k in range(26): decrypted = caesar_decrypt(k, cipher) if "this" in decrypted or "the" in decrypted or "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>
s174661305
p00017
WA: Presentation Error
import string import sys def CaesarCipher(): low=string.ascii_lowercase for cry in sys.stdin: for i in range(1,27): dec=cry.translate(str.maketrans(low,low[i:]+low[:i])) if 'this' in dec or 'that' in dec or 'the' in dec: print(dec) CaesarCipher()
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>
s403006000
p00017
WA: Presentation Error
import sys for s in map(list, sys.stdin.readlines()): while True: for i, c in enumerate(s): char_code = ord(c) if 97 <= char_code <= 122: char_code = char_code+1 if char_code < 122 else 97 s[i] = chr(char_code) _s = "".join(s) if "this" in _s or "the" in _s or "that" in _s: print(_s) 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>
s979093017
p00017
WA: Presentation Error
import sys a='abcdefghijklmnopqrstuvwxyz' for b in sys.stdin: for i in range(26): c=''.join(a[ord(e)-97-i]if e in a else e for e in b) if any(('the'in c,'this'in c,'that'in c)):print(c)
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>
s228469933
p00017
WA: Presentation Error
import sys for b in sys.stdin: for i in range(26): c=''.join([e,chr((ord(e)-96+i)%26+97)][96<ord(e)<123]for e in b) if any(('the'in c,'this'in c,'that'in c)):print(c)
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>
s300694169
p00017
WA: Presentation Error
import sys a = "abcdefghijklmnopqrstuvwxyz" x = str.maketrans(a, a[1:] + a[:1]) for s in sys.stdin: while True: s = s.translate(x) if "the" in s or "that" in s or "this " in s: print(s) 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>
s355497270
p00017
WA: Presentation Error
import sys def rp(char,n): p=ord(char)+n if 97 <= p-n <= 122: if p<=122: return chr(p) else: return chr(p-122+96) else: return char def find(str): for j in range(-25,25): l="".join([rp(i,j) for i in str]) if "this" in l or "the" in l or "that" in l: return l for text in sys.stdin: print(find(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>
s989761208
p00017
WA: Presentation Error
import sys def rp(char,n): p=ord(char)+n if 97 <= p-n <= 122: if p<=122: return chr(p) else: return chr(p-122+96) else: return char def find(str): for j in range(-25,25): l="".join([rp(i,j) for i in str]) if "this" in l or "the" in l or "that" in l: return l [print(i) for i in [find(text) for text in sys.stdin]]
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>
s714236861
p00017
WA: Presentation Error
import sys def rp(char,n): p=ord(char)+n if 97 <= p-n <= 122: if p<=122: return chr(p) else: return chr(p-122+96) else: return char def find(str): for j in range(-25,25): l="".join([rp(i,j) for i in str]) if "this" in l or "the" in l or "that" in l: return l [print(i) for i in [find(text) for text in sys.stdin] if 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>
s067818883
p00017
WA: Presentation Error
#! /usr/bin/python import sys from string import ascii_lowercase, whitespace def datasets(): for line in sys.stdin: yield line hints = ('the', 'this', 'that') inclement_chars = lambda cs, n: ''.join( [succ_char(c, n) if all([c not in case for case in (whitespace, '.', '\n')]) else c for c in cs]) make_picklist = lambda s: [inclement_chars(s, n) for n in range(1, 27)] def main(): for problem in datasets(): picklist = make_picklist(problem) for n, candidate in enumerate(picklist, 1): if any([case in candidate for case in hints]): break print picklist[n-1] def succ_char(c, n): succ_ord = ord(c)+n z = ord('z') if succ_ord > z: succ_ord = ord('a') + (succ_ord - z - 1) return chr(succ_ord) 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>
s831384398
p00017
WA: Presentation Error
from __future__ import (absolute_import, division, print_function, unicode_literals) from sys import stdin from string import ascii_lowercase as letters, maketrans table = maketrans(letters, letters[1:] + letters[:1]) for line in stdin: while True: line = line.translate(table) if 'the ' in line or 'this ' in line or 'that ' in line: break print(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>
s075983409
p00017
WA: Presentation Error
import sys,string rot1 = string.maketrans("abcdefghijklmnopqrstuvwxyz. ",\ "bcdefghijklmnopqrstuvwxyza. ") for line in sys.stdin: while 1: if line.count("the") or line.count("this") or line.count("that"): print line break line = line.translate(rot1)
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>
s844847331
p00018
Wrong Answer
n = map(int, raw_input().split()) for i in sorted(n): print i,
3 6 9 7 5
9 7 6 5 3
<H1>Sorting Five Numbers</H1> <p> Write a program which reads five numbers and sorts them in descending order. </p> <H2>Input</H2> <p> Input consists of five numbers <var>a</var>, <var>b</var>, <var>c</var>, <var>d</var> and <var>e</var> (-100000 &le; <var>a</var>, <var>b</var>, <var>c</var>, <var>d</var>,<var>e</var> &le; 100000). The five numbers are separeted by a space. </p> <H2>Output</H2> <p> Print the ordered numbers in a line. Adjacent numbers should be separated by a space. </p> <H2>Sample Input</H2> <pre> 3 6 9 7 5 </pre> <H2>Output for the Sample Input</H2> <pre> 9 7 6 5 3 </pre>
s991083273
p00018
Wrong Answer
while True: try: print "%d %d %d %d %d" % tuple(sorted(list(map(eval,raw_input().split())))) except EOFError: break
3 6 9 7 5
9 7 6 5 3
<H1>Sorting Five Numbers</H1> <p> Write a program which reads five numbers and sorts them in descending order. </p> <H2>Input</H2> <p> Input consists of five numbers <var>a</var>, <var>b</var>, <var>c</var>, <var>d</var> and <var>e</var> (-100000 &le; <var>a</var>, <var>b</var>, <var>c</var>, <var>d</var>,<var>e</var> &le; 100000). The five numbers are separeted by a space. </p> <H2>Output</H2> <p> Print the ordered numbers in a line. Adjacent numbers should be separated by a space. </p> <H2>Sample Input</H2> <pre> 3 6 9 7 5 </pre> <H2>Output for the Sample Input</H2> <pre> 9 7 6 5 3 </pre>
s278487188
p00018
Wrong Answer
s=list(map(int, input().split())) s.sort() for i in s: print(str(i)+" ", end="") print()
3 6 9 7 5
9 7 6 5 3
<H1>Sorting Five Numbers</H1> <p> Write a program which reads five numbers and sorts them in descending order. </p> <H2>Input</H2> <p> Input consists of five numbers <var>a</var>, <var>b</var>, <var>c</var>, <var>d</var> and <var>e</var> (-100000 &le; <var>a</var>, <var>b</var>, <var>c</var>, <var>d</var>,<var>e</var> &le; 100000). The five numbers are separeted by a space. </p> <H2>Output</H2> <p> Print the ordered numbers in a line. Adjacent numbers should be separated by a space. </p> <H2>Sample Input</H2> <pre> 3 6 9 7 5 </pre> <H2>Output for the Sample Input</H2> <pre> 9 7 6 5 3 </pre>
s383767771
p00018
Wrong Answer
s=list(map(int, input().split())) s.sort() for i in s: print(str(i), end="") if i != s[-1]: print(" ", end="") print()
3 6 9 7 5
9 7 6 5 3
<H1>Sorting Five Numbers</H1> <p> Write a program which reads five numbers and sorts them in descending order. </p> <H2>Input</H2> <p> Input consists of five numbers <var>a</var>, <var>b</var>, <var>c</var>, <var>d</var> and <var>e</var> (-100000 &le; <var>a</var>, <var>b</var>, <var>c</var>, <var>d</var>,<var>e</var> &le; 100000). The five numbers are separeted by a space. </p> <H2>Output</H2> <p> Print the ordered numbers in a line. Adjacent numbers should be separated by a space. </p> <H2>Sample Input</H2> <pre> 3 6 9 7 5 </pre> <H2>Output for the Sample Input</H2> <pre> 9 7 6 5 3 </pre>
s494570932
p00018
Wrong Answer
s=list(map(int, input().split())) s.sort() s.reverse() for i in s: print(i, end="") if i != s[-1]: print(" ", end="") else: print()
3 6 9 7 5
9 7 6 5 3
<H1>Sorting Five Numbers</H1> <p> Write a program which reads five numbers and sorts them in descending order. </p> <H2>Input</H2> <p> Input consists of five numbers <var>a</var>, <var>b</var>, <var>c</var>, <var>d</var> and <var>e</var> (-100000 &le; <var>a</var>, <var>b</var>, <var>c</var>, <var>d</var>,<var>e</var> &le; 100000). The five numbers are separeted by a space. </p> <H2>Output</H2> <p> Print the ordered numbers in a line. Adjacent numbers should be separated by a space. </p> <H2>Sample Input</H2> <pre> 3 6 9 7 5 </pre> <H2>Output for the Sample Input</H2> <pre> 9 7 6 5 3 </pre>
s598759447
p00018
Wrong Answer
n = raw_input() a = n.split() a.sort() a = a[::-1] print " ".join(a)
3 6 9 7 5
9 7 6 5 3
<H1>Sorting Five Numbers</H1> <p> Write a program which reads five numbers and sorts them in descending order. </p> <H2>Input</H2> <p> Input consists of five numbers <var>a</var>, <var>b</var>, <var>c</var>, <var>d</var> and <var>e</var> (-100000 &le; <var>a</var>, <var>b</var>, <var>c</var>, <var>d</var>,<var>e</var> &le; 100000). The five numbers are separeted by a space. </p> <H2>Output</H2> <p> Print the ordered numbers in a line. Adjacent numbers should be separated by a space. </p> <H2>Sample Input</H2> <pre> 3 6 9 7 5 </pre> <H2>Output for the Sample Input</H2> <pre> 9 7 6 5 3 </pre>
s998676859
p00018
Wrong Answer
input_line = raw_input().split() input_line.sort(reverse=True) print ' '.join(input_line)
3 6 9 7 5
9 7 6 5 3
<H1>Sorting Five Numbers</H1> <p> Write a program which reads five numbers and sorts them in descending order. </p> <H2>Input</H2> <p> Input consists of five numbers <var>a</var>, <var>b</var>, <var>c</var>, <var>d</var> and <var>e</var> (-100000 &le; <var>a</var>, <var>b</var>, <var>c</var>, <var>d</var>,<var>e</var> &le; 100000). The five numbers are separeted by a space. </p> <H2>Output</H2> <p> Print the ordered numbers in a line. Adjacent numbers should be separated by a space. </p> <H2>Sample Input</H2> <pre> 3 6 9 7 5 </pre> <H2>Output for the Sample Input</H2> <pre> 9 7 6 5 3 </pre>
s897687462
p00018
Wrong Answer
import sys for input_line in sys.stdin: input_line = input_line.split() input_line.sort(reverse=True) print ' '.join(input_line)
3 6 9 7 5
9 7 6 5 3
<H1>Sorting Five Numbers</H1> <p> Write a program which reads five numbers and sorts them in descending order. </p> <H2>Input</H2> <p> Input consists of five numbers <var>a</var>, <var>b</var>, <var>c</var>, <var>d</var> and <var>e</var> (-100000 &le; <var>a</var>, <var>b</var>, <var>c</var>, <var>d</var>,<var>e</var> &le; 100000). The five numbers are separeted by a space. </p> <H2>Output</H2> <p> Print the ordered numbers in a line. Adjacent numbers should be separated by a space. </p> <H2>Sample Input</H2> <pre> 3 6 9 7 5 </pre> <H2>Output for the Sample Input</H2> <pre> 9 7 6 5 3 </pre>
s928954314
p00018
Wrong Answer
nums = input().split() print(" ".join(nums.sort(reverse=True) or nums))
3 6 9 7 5
9 7 6 5 3
<H1>Sorting Five Numbers</H1> <p> Write a program which reads five numbers and sorts them in descending order. </p> <H2>Input</H2> <p> Input consists of five numbers <var>a</var>, <var>b</var>, <var>c</var>, <var>d</var> and <var>e</var> (-100000 &le; <var>a</var>, <var>b</var>, <var>c</var>, <var>d</var>,<var>e</var> &le; 100000). The five numbers are separeted by a space. </p> <H2>Output</H2> <p> Print the ordered numbers in a line. Adjacent numbers should be separated by a space. </p> <H2>Sample Input</H2> <pre> 3 6 9 7 5 </pre> <H2>Output for the Sample Input</H2> <pre> 9 7 6 5 3 </pre>
s542313664
p00018
Wrong Answer
# -*- coding:utf-8 -*- def main(): LIST=input().split() LIST.sort(reverse=True) print("{0} {1} {2} {3} {4}".format(LIST[0],LIST[1],LIST[2],LIST[3],LIST[4])) if __name__ == '__main__': main()
3 6 9 7 5
9 7 6 5 3
<H1>Sorting Five Numbers</H1> <p> Write a program which reads five numbers and sorts them in descending order. </p> <H2>Input</H2> <p> Input consists of five numbers <var>a</var>, <var>b</var>, <var>c</var>, <var>d</var> and <var>e</var> (-100000 &le; <var>a</var>, <var>b</var>, <var>c</var>, <var>d</var>,<var>e</var> &le; 100000). The five numbers are separeted by a space. </p> <H2>Output</H2> <p> Print the ordered numbers in a line. Adjacent numbers should be separated by a space. </p> <H2>Sample Input</H2> <pre> 3 6 9 7 5 </pre> <H2>Output for the Sample Input</H2> <pre> 9 7 6 5 3 </pre>
s380522370
p00018
Wrong Answer
# -*- coding:utf-8 -*- def main(): LIST=input().split() LIST.sort(reverse=True) map(int(),LIST) print("{0} {1} {2} {3} {4}".format(LIST[0],LIST[1],LIST[2],LIST[3],LIST[4])) if __name__ == '__main__': main()
3 6 9 7 5
9 7 6 5 3
<H1>Sorting Five Numbers</H1> <p> Write a program which reads five numbers and sorts them in descending order. </p> <H2>Input</H2> <p> Input consists of five numbers <var>a</var>, <var>b</var>, <var>c</var>, <var>d</var> and <var>e</var> (-100000 &le; <var>a</var>, <var>b</var>, <var>c</var>, <var>d</var>,<var>e</var> &le; 100000). The five numbers are separeted by a space. </p> <H2>Output</H2> <p> Print the ordered numbers in a line. Adjacent numbers should be separated by a space. </p> <H2>Sample Input</H2> <pre> 3 6 9 7 5 </pre> <H2>Output for the Sample Input</H2> <pre> 9 7 6 5 3 </pre>
s438531884
p00018
Wrong Answer
# -*- coding:utf-8 -*- def main(): l=input().split() l.sort(reverse=True) print(l[0],l[1],l[2],l[3],l[4]) if __name__ == '__main__': main()
3 6 9 7 5
9 7 6 5 3
<H1>Sorting Five Numbers</H1> <p> Write a program which reads five numbers and sorts them in descending order. </p> <H2>Input</H2> <p> Input consists of five numbers <var>a</var>, <var>b</var>, <var>c</var>, <var>d</var> and <var>e</var> (-100000 &le; <var>a</var>, <var>b</var>, <var>c</var>, <var>d</var>,<var>e</var> &le; 100000). The five numbers are separeted by a space. </p> <H2>Output</H2> <p> Print the ordered numbers in a line. Adjacent numbers should be separated by a space. </p> <H2>Sample Input</H2> <pre> 3 6 9 7 5 </pre> <H2>Output for the Sample Input</H2> <pre> 9 7 6 5 3 </pre>
s685873068
p00018
Wrong Answer
# -*- coding:utf-8 -*- def main(): l=input().split(" ") l.sort(reverse=True) print(int(l[0]),int(l[1]),int(l[2]),int(l[3]),int(l[4])) if __name__ == '__main__': main()
3 6 9 7 5
9 7 6 5 3
<H1>Sorting Five Numbers</H1> <p> Write a program which reads five numbers and sorts them in descending order. </p> <H2>Input</H2> <p> Input consists of five numbers <var>a</var>, <var>b</var>, <var>c</var>, <var>d</var> and <var>e</var> (-100000 &le; <var>a</var>, <var>b</var>, <var>c</var>, <var>d</var>,<var>e</var> &le; 100000). The five numbers are separeted by a space. </p> <H2>Output</H2> <p> Print the ordered numbers in a line. Adjacent numbers should be separated by a space. </p> <H2>Sample Input</H2> <pre> 3 6 9 7 5 </pre> <H2>Output for the Sample Input</H2> <pre> 9 7 6 5 3 </pre>
s932039337
p00018
Wrong Answer
l=input().split(" ") l.sort(reverse=True) print(int(l[0]),int(l[1]),int(l[2]),int(l[3]),int(l[4]))
3 6 9 7 5
9 7 6 5 3
<H1>Sorting Five Numbers</H1> <p> Write a program which reads five numbers and sorts them in descending order. </p> <H2>Input</H2> <p> Input consists of five numbers <var>a</var>, <var>b</var>, <var>c</var>, <var>d</var> and <var>e</var> (-100000 &le; <var>a</var>, <var>b</var>, <var>c</var>, <var>d</var>,<var>e</var> &le; 100000). The five numbers are separeted by a space. </p> <H2>Output</H2> <p> Print the ordered numbers in a line. Adjacent numbers should be separated by a space. </p> <H2>Sample Input</H2> <pre> 3 6 9 7 5 </pre> <H2>Output for the Sample Input</H2> <pre> 9 7 6 5 3 </pre>
s510500592
p00018
Wrong Answer
L = map(int, raw_input().split()) print sorted(L, reverse = True)
3 6 9 7 5
9 7 6 5 3
<H1>Sorting Five Numbers</H1> <p> Write a program which reads five numbers and sorts them in descending order. </p> <H2>Input</H2> <p> Input consists of five numbers <var>a</var>, <var>b</var>, <var>c</var>, <var>d</var> and <var>e</var> (-100000 &le; <var>a</var>, <var>b</var>, <var>c</var>, <var>d</var>,<var>e</var> &le; 100000). The five numbers are separeted by a space. </p> <H2>Output</H2> <p> Print the ordered numbers in a line. Adjacent numbers should be separated by a space. </p> <H2>Sample Input</H2> <pre> 3 6 9 7 5 </pre> <H2>Output for the Sample Input</H2> <pre> 9 7 6 5 3 </pre>
s455633742
p00018
Wrong Answer
a=input().split(" ") a.sort(reverse=True) print(a[0], a[1], a[2], a[3], a[4])
3 6 9 7 5
9 7 6 5 3
<H1>Sorting Five Numbers</H1> <p> Write a program which reads five numbers and sorts them in descending order. </p> <H2>Input</H2> <p> Input consists of five numbers <var>a</var>, <var>b</var>, <var>c</var>, <var>d</var> and <var>e</var> (-100000 &le; <var>a</var>, <var>b</var>, <var>c</var>, <var>d</var>,<var>e</var> &le; 100000). The five numbers are separeted by a space. </p> <H2>Output</H2> <p> Print the ordered numbers in a line. Adjacent numbers should be separated by a space. </p> <H2>Sample Input</H2> <pre> 3 6 9 7 5 </pre> <H2>Output for the Sample Input</H2> <pre> 9 7 6 5 3 </pre>
s339641420
p00018
Wrong Answer
a=input().split(" ") a.sort(reverse=True) ' '.join(a)
3 6 9 7 5
9 7 6 5 3
<H1>Sorting Five Numbers</H1> <p> Write a program which reads five numbers and sorts them in descending order. </p> <H2>Input</H2> <p> Input consists of five numbers <var>a</var>, <var>b</var>, <var>c</var>, <var>d</var> and <var>e</var> (-100000 &le; <var>a</var>, <var>b</var>, <var>c</var>, <var>d</var>,<var>e</var> &le; 100000). The five numbers are separeted by a space. </p> <H2>Output</H2> <p> Print the ordered numbers in a line. Adjacent numbers should be separated by a space. </p> <H2>Sample Input</H2> <pre> 3 6 9 7 5 </pre> <H2>Output for the Sample Input</H2> <pre> 9 7 6 5 3 </pre>
s061181010
p00018
Wrong Answer
a=input().split(" ") a.sort(reverse=True) print(' '.join(a))
3 6 9 7 5
9 7 6 5 3
<H1>Sorting Five Numbers</H1> <p> Write a program which reads five numbers and sorts them in descending order. </p> <H2>Input</H2> <p> Input consists of five numbers <var>a</var>, <var>b</var>, <var>c</var>, <var>d</var> and <var>e</var> (-100000 &le; <var>a</var>, <var>b</var>, <var>c</var>, <var>d</var>,<var>e</var> &le; 100000). The five numbers are separeted by a space. </p> <H2>Output</H2> <p> Print the ordered numbers in a line. Adjacent numbers should be separated by a space. </p> <H2>Sample Input</H2> <pre> 3 6 9 7 5 </pre> <H2>Output for the Sample Input</H2> <pre> 9 7 6 5 3 </pre>
s339399618
p00018
Wrong Answer
nums = map(int, raw_input().split()) nums_sort = sorted(nums) ans = " ".join(map(str,nums_sort)) print ans
3 6 9 7 5
9 7 6 5 3
<H1>Sorting Five Numbers</H1> <p> Write a program which reads five numbers and sorts them in descending order. </p> <H2>Input</H2> <p> Input consists of five numbers <var>a</var>, <var>b</var>, <var>c</var>, <var>d</var> and <var>e</var> (-100000 &le; <var>a</var>, <var>b</var>, <var>c</var>, <var>d</var>,<var>e</var> &le; 100000). The five numbers are separeted by a space. </p> <H2>Output</H2> <p> Print the ordered numbers in a line. Adjacent numbers should be separated by a space. </p> <H2>Sample Input</H2> <pre> 3 6 9 7 5 </pre> <H2>Output for the Sample Input</H2> <pre> 9 7 6 5 3 </pre>
s715358672
p00018
Wrong Answer
print(*sorted(input().split(), reverse=True))
3 6 9 7 5
9 7 6 5 3
<H1>Sorting Five Numbers</H1> <p> Write a program which reads five numbers and sorts them in descending order. </p> <H2>Input</H2> <p> Input consists of five numbers <var>a</var>, <var>b</var>, <var>c</var>, <var>d</var> and <var>e</var> (-100000 &le; <var>a</var>, <var>b</var>, <var>c</var>, <var>d</var>,<var>e</var> &le; 100000). The five numbers are separeted by a space. </p> <H2>Output</H2> <p> Print the ordered numbers in a line. Adjacent numbers should be separated by a space. </p> <H2>Sample Input</H2> <pre> 3 6 9 7 5 </pre> <H2>Output for the Sample Input</H2> <pre> 9 7 6 5 3 </pre>
s567076255
p00018
Wrong Answer
print(' '.join(sorted(input().split())[::-1]))
3 6 9 7 5
9 7 6 5 3
<H1>Sorting Five Numbers</H1> <p> Write a program which reads five numbers and sorts them in descending order. </p> <H2>Input</H2> <p> Input consists of five numbers <var>a</var>, <var>b</var>, <var>c</var>, <var>d</var> and <var>e</var> (-100000 &le; <var>a</var>, <var>b</var>, <var>c</var>, <var>d</var>,<var>e</var> &le; 100000). The five numbers are separeted by a space. </p> <H2>Output</H2> <p> Print the ordered numbers in a line. Adjacent numbers should be separated by a space. </p> <H2>Sample Input</H2> <pre> 3 6 9 7 5 </pre> <H2>Output for the Sample Input</H2> <pre> 9 7 6 5 3 </pre>
s875767697
p00018
Wrong Answer
n=map(str,raw_input().split()) n.sort() n.reverse() print(" ".join(n))
3 6 9 7 5
9 7 6 5 3
<H1>Sorting Five Numbers</H1> <p> Write a program which reads five numbers and sorts them in descending order. </p> <H2>Input</H2> <p> Input consists of five numbers <var>a</var>, <var>b</var>, <var>c</var>, <var>d</var> and <var>e</var> (-100000 &le; <var>a</var>, <var>b</var>, <var>c</var>, <var>d</var>,<var>e</var> &le; 100000). The five numbers are separeted by a space. </p> <H2>Output</H2> <p> Print the ordered numbers in a line. Adjacent numbers should be separated by a space. </p> <H2>Sample Input</H2> <pre> 3 6 9 7 5 </pre> <H2>Output for the Sample Input</H2> <pre> 9 7 6 5 3 </pre>
s734982172
p00018
Wrong Answer
s = input().split() arr = [int(s[i]) for i in range(5)] arr.sort(reverse=True) print(arr)
3 6 9 7 5
9 7 6 5 3
<H1>Sorting Five Numbers</H1> <p> Write a program which reads five numbers and sorts them in descending order. </p> <H2>Input</H2> <p> Input consists of five numbers <var>a</var>, <var>b</var>, <var>c</var>, <var>d</var> and <var>e</var> (-100000 &le; <var>a</var>, <var>b</var>, <var>c</var>, <var>d</var>,<var>e</var> &le; 100000). The five numbers are separeted by a space. </p> <H2>Output</H2> <p> Print the ordered numbers in a line. Adjacent numbers should be separated by a space. </p> <H2>Sample Input</H2> <pre> 3 6 9 7 5 </pre> <H2>Output for the Sample Input</H2> <pre> 9 7 6 5 3 </pre>
s926316087
p00018
Wrong Answer
print(' '.join(sorted(input().split(), reverse=True)))
3 6 9 7 5
9 7 6 5 3
<H1>Sorting Five Numbers</H1> <p> Write a program which reads five numbers and sorts them in descending order. </p> <H2>Input</H2> <p> Input consists of five numbers <var>a</var>, <var>b</var>, <var>c</var>, <var>d</var> and <var>e</var> (-100000 &le; <var>a</var>, <var>b</var>, <var>c</var>, <var>d</var>,<var>e</var> &le; 100000). The five numbers are separeted by a space. </p> <H2>Output</H2> <p> Print the ordered numbers in a line. Adjacent numbers should be separated by a space. </p> <H2>Sample Input</H2> <pre> 3 6 9 7 5 </pre> <H2>Output for the Sample Input</H2> <pre> 9 7 6 5 3 </pre>
s189008922
p00018
Wrong Answer
# -*- coding: utf-8 -*- l = input().split() print(' '.join(str(e) for e in sorted(l, reverse=True)))
3 6 9 7 5
9 7 6 5 3
<H1>Sorting Five Numbers</H1> <p> Write a program which reads five numbers and sorts them in descending order. </p> <H2>Input</H2> <p> Input consists of five numbers <var>a</var>, <var>b</var>, <var>c</var>, <var>d</var> and <var>e</var> (-100000 &le; <var>a</var>, <var>b</var>, <var>c</var>, <var>d</var>,<var>e</var> &le; 100000). The five numbers are separeted by a space. </p> <H2>Output</H2> <p> Print the ordered numbers in a line. Adjacent numbers should be separated by a space. </p> <H2>Sample Input</H2> <pre> 3 6 9 7 5 </pre> <H2>Output for the Sample Input</H2> <pre> 9 7 6 5 3 </pre>
s574569089
p00018
Wrong Answer
x = map(int, raw_input().split(" ")) x.sort() for i in range(5): print x[i],
3 6 9 7 5
9 7 6 5 3
<H1>Sorting Five Numbers</H1> <p> Write a program which reads five numbers and sorts them in descending order. </p> <H2>Input</H2> <p> Input consists of five numbers <var>a</var>, <var>b</var>, <var>c</var>, <var>d</var> and <var>e</var> (-100000 &le; <var>a</var>, <var>b</var>, <var>c</var>, <var>d</var>,<var>e</var> &le; 100000). The five numbers are separeted by a space. </p> <H2>Output</H2> <p> Print the ordered numbers in a line. Adjacent numbers should be separated by a space. </p> <H2>Sample Input</H2> <pre> 3 6 9 7 5 </pre> <H2>Output for the Sample Input</H2> <pre> 9 7 6 5 3 </pre>
s567980740
p00018
Wrong Answer
print(' '.join(sorted((input().split()), reverse=True)))
3 6 9 7 5
9 7 6 5 3
<H1>Sorting Five Numbers</H1> <p> Write a program which reads five numbers and sorts them in descending order. </p> <H2>Input</H2> <p> Input consists of five numbers <var>a</var>, <var>b</var>, <var>c</var>, <var>d</var> and <var>e</var> (-100000 &le; <var>a</var>, <var>b</var>, <var>c</var>, <var>d</var>,<var>e</var> &le; 100000). The five numbers are separeted by a space. </p> <H2>Output</H2> <p> Print the ordered numbers in a line. Adjacent numbers should be separated by a space. </p> <H2>Sample Input</H2> <pre> 3 6 9 7 5 </pre> <H2>Output for the Sample Input</H2> <pre> 9 7 6 5 3 </pre>
s289578875
p00018
Wrong Answer
print(' '.join(map(str, reversed(sorted(input().split())))))
3 6 9 7 5
9 7 6 5 3
<H1>Sorting Five Numbers</H1> <p> Write a program which reads five numbers and sorts them in descending order. </p> <H2>Input</H2> <p> Input consists of five numbers <var>a</var>, <var>b</var>, <var>c</var>, <var>d</var> and <var>e</var> (-100000 &le; <var>a</var>, <var>b</var>, <var>c</var>, <var>d</var>,<var>e</var> &le; 100000). The five numbers are separeted by a space. </p> <H2>Output</H2> <p> Print the ordered numbers in a line. Adjacent numbers should be separated by a space. </p> <H2>Sample Input</H2> <pre> 3 6 9 7 5 </pre> <H2>Output for the Sample Input</H2> <pre> 9 7 6 5 3 </pre>
s786111850
p00018
Wrong Answer
a=sorted([int(i) for i in input().split()],reverse=True) print(",".join(map(str,a)))
3 6 9 7 5
9 7 6 5 3
<H1>Sorting Five Numbers</H1> <p> Write a program which reads five numbers and sorts them in descending order. </p> <H2>Input</H2> <p> Input consists of five numbers <var>a</var>, <var>b</var>, <var>c</var>, <var>d</var> and <var>e</var> (-100000 &le; <var>a</var>, <var>b</var>, <var>c</var>, <var>d</var>,<var>e</var> &le; 100000). The five numbers are separeted by a space. </p> <H2>Output</H2> <p> Print the ordered numbers in a line. Adjacent numbers should be separated by a space. </p> <H2>Sample Input</H2> <pre> 3 6 9 7 5 </pre> <H2>Output for the Sample Input</H2> <pre> 9 7 6 5 3 </pre>
s904362286
p00018
Wrong Answer
print(sorted(list(map(int, input().split())), reverse=True))
3 6 9 7 5
9 7 6 5 3
<H1>Sorting Five Numbers</H1> <p> Write a program which reads five numbers and sorts them in descending order. </p> <H2>Input</H2> <p> Input consists of five numbers <var>a</var>, <var>b</var>, <var>c</var>, <var>d</var> and <var>e</var> (-100000 &le; <var>a</var>, <var>b</var>, <var>c</var>, <var>d</var>,<var>e</var> &le; 100000). The five numbers are separeted by a space. </p> <H2>Output</H2> <p> Print the ordered numbers in a line. Adjacent numbers should be separated by a space. </p> <H2>Sample Input</H2> <pre> 3 6 9 7 5 </pre> <H2>Output for the Sample Input</H2> <pre> 9 7 6 5 3 </pre>
s826784551
p00018
Wrong Answer
print(' '.join(sorted(list(map(str, input().split())), reverse=True)))
3 6 9 7 5
9 7 6 5 3
<H1>Sorting Five Numbers</H1> <p> Write a program which reads five numbers and sorts them in descending order. </p> <H2>Input</H2> <p> Input consists of five numbers <var>a</var>, <var>b</var>, <var>c</var>, <var>d</var> and <var>e</var> (-100000 &le; <var>a</var>, <var>b</var>, <var>c</var>, <var>d</var>,<var>e</var> &le; 100000). The five numbers are separeted by a space. </p> <H2>Output</H2> <p> Print the ordered numbers in a line. Adjacent numbers should be separated by a space. </p> <H2>Sample Input</H2> <pre> 3 6 9 7 5 </pre> <H2>Output for the Sample Input</H2> <pre> 9 7 6 5 3 </pre>
s384616239
p00018
Wrong Answer
print(" ".join(sorted(input().split(), reverse = True)))
3 6 9 7 5
9 7 6 5 3
<H1>Sorting Five Numbers</H1> <p> Write a program which reads five numbers and sorts them in descending order. </p> <H2>Input</H2> <p> Input consists of five numbers <var>a</var>, <var>b</var>, <var>c</var>, <var>d</var> and <var>e</var> (-100000 &le; <var>a</var>, <var>b</var>, <var>c</var>, <var>d</var>,<var>e</var> &le; 100000). The five numbers are separeted by a space. </p> <H2>Output</H2> <p> Print the ordered numbers in a line. Adjacent numbers should be separated by a space. </p> <H2>Sample Input</H2> <pre> 3 6 9 7 5 </pre> <H2>Output for the Sample Input</H2> <pre> 9 7 6 5 3 </pre>
s454423622
p00018
Wrong Answer
line = raw_input() print line[::-1]
3 6 9 7 5
9 7 6 5 3
<H1>Sorting Five Numbers</H1> <p> Write a program which reads five numbers and sorts them in descending order. </p> <H2>Input</H2> <p> Input consists of five numbers <var>a</var>, <var>b</var>, <var>c</var>, <var>d</var> and <var>e</var> (-100000 &le; <var>a</var>, <var>b</var>, <var>c</var>, <var>d</var>,<var>e</var> &le; 100000). The five numbers are separeted by a space. </p> <H2>Output</H2> <p> Print the ordered numbers in a line. Adjacent numbers should be separated by a space. </p> <H2>Sample Input</H2> <pre> 3 6 9 7 5 </pre> <H2>Output for the Sample Input</H2> <pre> 9 7 6 5 3 </pre>
s002520574
p00018
Wrong Answer
print(*sorted(input().split())[::-1])
3 6 9 7 5
9 7 6 5 3
<H1>Sorting Five Numbers</H1> <p> Write a program which reads five numbers and sorts them in descending order. </p> <H2>Input</H2> <p> Input consists of five numbers <var>a</var>, <var>b</var>, <var>c</var>, <var>d</var> and <var>e</var> (-100000 &le; <var>a</var>, <var>b</var>, <var>c</var>, <var>d</var>,<var>e</var> &le; 100000). The five numbers are separeted by a space. </p> <H2>Output</H2> <p> Print the ordered numbers in a line. Adjacent numbers should be separated by a space. </p> <H2>Sample Input</H2> <pre> 3 6 9 7 5 </pre> <H2>Output for the Sample Input</H2> <pre> 9 7 6 5 3 </pre>
s467712235
p00018
Wrong Answer
a = [int(temp) for temp in input().split()] a.sort a = [str(temp) for temp in a] print(' '.join(a))
3 6 9 7 5
9 7 6 5 3
<H1>Sorting Five Numbers</H1> <p> Write a program which reads five numbers and sorts them in descending order. </p> <H2>Input</H2> <p> Input consists of five numbers <var>a</var>, <var>b</var>, <var>c</var>, <var>d</var> and <var>e</var> (-100000 &le; <var>a</var>, <var>b</var>, <var>c</var>, <var>d</var>,<var>e</var> &le; 100000). The five numbers are separeted by a space. </p> <H2>Output</H2> <p> Print the ordered numbers in a line. Adjacent numbers should be separated by a space. </p> <H2>Sample Input</H2> <pre> 3 6 9 7 5 </pre> <H2>Output for the Sample Input</H2> <pre> 9 7 6 5 3 </pre>
s212142684
p00018
Wrong Answer
l = list(map(int,input().split())) l.sort(reverse=True) print(l)
3 6 9 7 5
9 7 6 5 3
<H1>Sorting Five Numbers</H1> <p> Write a program which reads five numbers and sorts them in descending order. </p> <H2>Input</H2> <p> Input consists of five numbers <var>a</var>, <var>b</var>, <var>c</var>, <var>d</var> and <var>e</var> (-100000 &le; <var>a</var>, <var>b</var>, <var>c</var>, <var>d</var>,<var>e</var> &le; 100000). The five numbers are separeted by a space. </p> <H2>Output</H2> <p> Print the ordered numbers in a line. Adjacent numbers should be separated by a space. </p> <H2>Sample Input</H2> <pre> 3 6 9 7 5 </pre> <H2>Output for the Sample Input</H2> <pre> 9 7 6 5 3 </pre>
s139253154
p00018
Wrong Answer
print(*sorted(list(map(int, input().split()))[::-1]))
3 6 9 7 5
9 7 6 5 3
<H1>Sorting Five Numbers</H1> <p> Write a program which reads five numbers and sorts them in descending order. </p> <H2>Input</H2> <p> Input consists of five numbers <var>a</var>, <var>b</var>, <var>c</var>, <var>d</var> and <var>e</var> (-100000 &le; <var>a</var>, <var>b</var>, <var>c</var>, <var>d</var>,<var>e</var> &le; 100000). The five numbers are separeted by a space. </p> <H2>Output</H2> <p> Print the ordered numbers in a line. Adjacent numbers should be separated by a space. </p> <H2>Sample Input</H2> <pre> 3 6 9 7 5 </pre> <H2>Output for the Sample Input</H2> <pre> 9 7 6 5 3 </pre>
s110432180
p00018
Wrong Answer
print(sorted(map(int, input().split()), reverse=True))
3 6 9 7 5
9 7 6 5 3
<H1>Sorting Five Numbers</H1> <p> Write a program which reads five numbers and sorts them in descending order. </p> <H2>Input</H2> <p> Input consists of five numbers <var>a</var>, <var>b</var>, <var>c</var>, <var>d</var> and <var>e</var> (-100000 &le; <var>a</var>, <var>b</var>, <var>c</var>, <var>d</var>,<var>e</var> &le; 100000). The five numbers are separeted by a space. </p> <H2>Output</H2> <p> Print the ordered numbers in a line. Adjacent numbers should be separated by a space. </p> <H2>Sample Input</H2> <pre> 3 6 9 7 5 </pre> <H2>Output for the Sample Input</H2> <pre> 9 7 6 5 3 </pre>
s692931299
p00018
Wrong Answer
x=input().split() y=sorted(x,reverse=True) for i in range(len(y)-1): print(y[i],end="") print(' ',end="") print(y[len(y)-1])
3 6 9 7 5
9 7 6 5 3
<H1>Sorting Five Numbers</H1> <p> Write a program which reads five numbers and sorts them in descending order. </p> <H2>Input</H2> <p> Input consists of five numbers <var>a</var>, <var>b</var>, <var>c</var>, <var>d</var> and <var>e</var> (-100000 &le; <var>a</var>, <var>b</var>, <var>c</var>, <var>d</var>,<var>e</var> &le; 100000). The five numbers are separeted by a space. </p> <H2>Output</H2> <p> Print the ordered numbers in a line. Adjacent numbers should be separated by a space. </p> <H2>Sample Input</H2> <pre> 3 6 9 7 5 </pre> <H2>Output for the Sample Input</H2> <pre> 9 7 6 5 3 </pre>
s237131172
p00018
Wrong Answer
x=input().split() y=sorted(x,reverse=True) a=[] b=[] for i in range(len(y)): if int(y[i])>=0: a.append(y[i]) else: b.append(abs(int(y[i]))) b=sorted(b) for i in range(len(b)): a.append(-b[i]) for i in range(len(a)-1): print(a[i],end="") print(' ',end="") print(a[len(a)-1])
3 6 9 7 5
9 7 6 5 3
<H1>Sorting Five Numbers</H1> <p> Write a program which reads five numbers and sorts them in descending order. </p> <H2>Input</H2> <p> Input consists of five numbers <var>a</var>, <var>b</var>, <var>c</var>, <var>d</var> and <var>e</var> (-100000 &le; <var>a</var>, <var>b</var>, <var>c</var>, <var>d</var>,<var>e</var> &le; 100000). The five numbers are separeted by a space. </p> <H2>Output</H2> <p> Print the ordered numbers in a line. Adjacent numbers should be separated by a space. </p> <H2>Sample Input</H2> <pre> 3 6 9 7 5 </pre> <H2>Output for the Sample Input</H2> <pre> 9 7 6 5 3 </pre>
s250728913
p00018
Wrong Answer
# -*- coding:utf-8 -*- a=map(int,raw_input().split(" ")) a.sort(reverse=True) for val in a: print val
3 6 9 7 5
9 7 6 5 3
<H1>Sorting Five Numbers</H1> <p> Write a program which reads five numbers and sorts them in descending order. </p> <H2>Input</H2> <p> Input consists of five numbers <var>a</var>, <var>b</var>, <var>c</var>, <var>d</var> and <var>e</var> (-100000 &le; <var>a</var>, <var>b</var>, <var>c</var>, <var>d</var>,<var>e</var> &le; 100000). The five numbers are separeted by a space. </p> <H2>Output</H2> <p> Print the ordered numbers in a line. Adjacent numbers should be separated by a space. </p> <H2>Sample Input</H2> <pre> 3 6 9 7 5 </pre> <H2>Output for the Sample Input</H2> <pre> 9 7 6 5 3 </pre>
s888821894
p00018
Wrong Answer
def main(): A = input().split() A.sort() A.reverse() _str = " ".join(A) print(_str) if __name__ == '__main__': main()
3 6 9 7 5
9 7 6 5 3
<H1>Sorting Five Numbers</H1> <p> Write a program which reads five numbers and sorts them in descending order. </p> <H2>Input</H2> <p> Input consists of five numbers <var>a</var>, <var>b</var>, <var>c</var>, <var>d</var> and <var>e</var> (-100000 &le; <var>a</var>, <var>b</var>, <var>c</var>, <var>d</var>,<var>e</var> &le; 100000). The five numbers are separeted by a space. </p> <H2>Output</H2> <p> Print the ordered numbers in a line. Adjacent numbers should be separated by a space. </p> <H2>Sample Input</H2> <pre> 3 6 9 7 5 </pre> <H2>Output for the Sample Input</H2> <pre> 9 7 6 5 3 </pre>
s147907934
p00018
Wrong Answer
l = raw_input().split() l.sort() l.reverse() output = ' '.join(l) print output
3 6 9 7 5
9 7 6 5 3
<H1>Sorting Five Numbers</H1> <p> Write a program which reads five numbers and sorts them in descending order. </p> <H2>Input</H2> <p> Input consists of five numbers <var>a</var>, <var>b</var>, <var>c</var>, <var>d</var> and <var>e</var> (-100000 &le; <var>a</var>, <var>b</var>, <var>c</var>, <var>d</var>,<var>e</var> &le; 100000). The five numbers are separeted by a space. </p> <H2>Output</H2> <p> Print the ordered numbers in a line. Adjacent numbers should be separated by a space. </p> <H2>Sample Input</H2> <pre> 3 6 9 7 5 </pre> <H2>Output for the Sample Input</H2> <pre> 9 7 6 5 3 </pre>
s978416369
p00018
Wrong Answer
while True: try: l = raw_input().split() if len(l)==0: break l.sort() l.reverse() output = ' '.join(l) print output except: break
3 6 9 7 5
9 7 6 5 3
<H1>Sorting Five Numbers</H1> <p> Write a program which reads five numbers and sorts them in descending order. </p> <H2>Input</H2> <p> Input consists of five numbers <var>a</var>, <var>b</var>, <var>c</var>, <var>d</var> and <var>e</var> (-100000 &le; <var>a</var>, <var>b</var>, <var>c</var>, <var>d</var>,<var>e</var> &le; 100000). The five numbers are separeted by a space. </p> <H2>Output</H2> <p> Print the ordered numbers in a line. Adjacent numbers should be separated by a space. </p> <H2>Sample Input</H2> <pre> 3 6 9 7 5 </pre> <H2>Output for the Sample Input</H2> <pre> 9 7 6 5 3 </pre>
s169374721
p00018
Wrong Answer
print(*sorted(input().split())[::-1])
3 6 9 7 5
9 7 6 5 3
<H1>Sorting Five Numbers</H1> <p> Write a program which reads five numbers and sorts them in descending order. </p> <H2>Input</H2> <p> Input consists of five numbers <var>a</var>, <var>b</var>, <var>c</var>, <var>d</var> and <var>e</var> (-100000 &le; <var>a</var>, <var>b</var>, <var>c</var>, <var>d</var>,<var>e</var> &le; 100000). The five numbers are separeted by a space. </p> <H2>Output</H2> <p> Print the ordered numbers in a line. Adjacent numbers should be separated by a space. </p> <H2>Sample Input</H2> <pre> 3 6 9 7 5 </pre> <H2>Output for the Sample Input</H2> <pre> 9 7 6 5 3 </pre>
s935305338
p00018
Wrong Answer
print(*reversed(list(map(int,input().split()))))
3 6 9 7 5
9 7 6 5 3
<H1>Sorting Five Numbers</H1> <p> Write a program which reads five numbers and sorts them in descending order. </p> <H2>Input</H2> <p> Input consists of five numbers <var>a</var>, <var>b</var>, <var>c</var>, <var>d</var> and <var>e</var> (-100000 &le; <var>a</var>, <var>b</var>, <var>c</var>, <var>d</var>,<var>e</var> &le; 100000). The five numbers are separeted by a space. </p> <H2>Output</H2> <p> Print the ordered numbers in a line. Adjacent numbers should be separated by a space. </p> <H2>Sample Input</H2> <pre> 3 6 9 7 5 </pre> <H2>Output for the Sample Input</H2> <pre> 9 7 6 5 3 </pre>
s003105415
p00018
Wrong Answer
print(*reversed([int(e)for e in input().split()]))
3 6 9 7 5
9 7 6 5 3
<H1>Sorting Five Numbers</H1> <p> Write a program which reads five numbers and sorts them in descending order. </p> <H2>Input</H2> <p> Input consists of five numbers <var>a</var>, <var>b</var>, <var>c</var>, <var>d</var> and <var>e</var> (-100000 &le; <var>a</var>, <var>b</var>, <var>c</var>, <var>d</var>,<var>e</var> &le; 100000). The five numbers are separeted by a space. </p> <H2>Output</H2> <p> Print the ordered numbers in a line. Adjacent numbers should be separated by a space. </p> <H2>Sample Input</H2> <pre> 3 6 9 7 5 </pre> <H2>Output for the Sample Input</H2> <pre> 9 7 6 5 3 </pre>
s915170122
p00018
Wrong Answer
print(reversed(sorted(map(int,input().split()))[::-1]))
3 6 9 7 5
9 7 6 5 3
<H1>Sorting Five Numbers</H1> <p> Write a program which reads five numbers and sorts them in descending order. </p> <H2>Input</H2> <p> Input consists of five numbers <var>a</var>, <var>b</var>, <var>c</var>, <var>d</var> and <var>e</var> (-100000 &le; <var>a</var>, <var>b</var>, <var>c</var>, <var>d</var>,<var>e</var> &le; 100000). The five numbers are separeted by a space. </p> <H2>Output</H2> <p> Print the ordered numbers in a line. Adjacent numbers should be separated by a space. </p> <H2>Sample Input</H2> <pre> 3 6 9 7 5 </pre> <H2>Output for the Sample Input</H2> <pre> 9 7 6 5 3 </pre>
s636967228
p00018
Wrong Answer
print(" ".join(sorted([i for i in input().split()],reverse=True)))
3 6 9 7 5
9 7 6 5 3
<H1>Sorting Five Numbers</H1> <p> Write a program which reads five numbers and sorts them in descending order. </p> <H2>Input</H2> <p> Input consists of five numbers <var>a</var>, <var>b</var>, <var>c</var>, <var>d</var> and <var>e</var> (-100000 &le; <var>a</var>, <var>b</var>, <var>c</var>, <var>d</var>,<var>e</var> &le; 100000). The five numbers are separeted by a space. </p> <H2>Output</H2> <p> Print the ordered numbers in a line. Adjacent numbers should be separated by a space. </p> <H2>Sample Input</H2> <pre> 3 6 9 7 5 </pre> <H2>Output for the Sample Input</H2> <pre> 9 7 6 5 3 </pre>
s306183781
p00018
Wrong Answer
lst = map(int,raw_input().split()) lst.sort() lst.reverse() print lst
3 6 9 7 5
9 7 6 5 3
<H1>Sorting Five Numbers</H1> <p> Write a program which reads five numbers and sorts them in descending order. </p> <H2>Input</H2> <p> Input consists of five numbers <var>a</var>, <var>b</var>, <var>c</var>, <var>d</var> and <var>e</var> (-100000 &le; <var>a</var>, <var>b</var>, <var>c</var>, <var>d</var>,<var>e</var> &le; 100000). The five numbers are separeted by a space. </p> <H2>Output</H2> <p> Print the ordered numbers in a line. Adjacent numbers should be separated by a space. </p> <H2>Sample Input</H2> <pre> 3 6 9 7 5 </pre> <H2>Output for the Sample Input</H2> <pre> 9 7 6 5 3 </pre>
s644770281
p00018
Wrong Answer
x = map(int, raw_input().split(' ')) x.sort() for a in x: print a,
3 6 9 7 5
9 7 6 5 3
<H1>Sorting Five Numbers</H1> <p> Write a program which reads five numbers and sorts them in descending order. </p> <H2>Input</H2> <p> Input consists of five numbers <var>a</var>, <var>b</var>, <var>c</var>, <var>d</var> and <var>e</var> (-100000 &le; <var>a</var>, <var>b</var>, <var>c</var>, <var>d</var>,<var>e</var> &le; 100000). The five numbers are separeted by a space. </p> <H2>Output</H2> <p> Print the ordered numbers in a line. Adjacent numbers should be separated by a space. </p> <H2>Sample Input</H2> <pre> 3 6 9 7 5 </pre> <H2>Output for the Sample Input</H2> <pre> 9 7 6 5 3 </pre>
s392335286
p00018
Wrong Answer
#!/usr/bin/python import sys for line in sys.stdin: l = line.strip().split() l.sort() l.reverse() out = ' '.join(l) print out
3 6 9 7 5
9 7 6 5 3
<H1>Sorting Five Numbers</H1> <p> Write a program which reads five numbers and sorts them in descending order. </p> <H2>Input</H2> <p> Input consists of five numbers <var>a</var>, <var>b</var>, <var>c</var>, <var>d</var> and <var>e</var> (-100000 &le; <var>a</var>, <var>b</var>, <var>c</var>, <var>d</var>,<var>e</var> &le; 100000). The five numbers are separeted by a space. </p> <H2>Output</H2> <p> Print the ordered numbers in a line. Adjacent numbers should be separated by a space. </p> <H2>Sample Input</H2> <pre> 3 6 9 7 5 </pre> <H2>Output for the Sample Input</H2> <pre> 9 7 6 5 3 </pre>
s280986141
p00018
Wrong Answer
#!/usr/bin/python line = raw_input() l = line.strip().split() l.sort() l.reverse() out = ' '.join(l) print out
3 6 9 7 5
9 7 6 5 3
<H1>Sorting Five Numbers</H1> <p> Write a program which reads five numbers and sorts them in descending order. </p> <H2>Input</H2> <p> Input consists of five numbers <var>a</var>, <var>b</var>, <var>c</var>, <var>d</var> and <var>e</var> (-100000 &le; <var>a</var>, <var>b</var>, <var>c</var>, <var>d</var>,<var>e</var> &le; 100000). The five numbers are separeted by a space. </p> <H2>Output</H2> <p> Print the ordered numbers in a line. Adjacent numbers should be separated by a space. </p> <H2>Sample Input</H2> <pre> 3 6 9 7 5 </pre> <H2>Output for the Sample Input</H2> <pre> 9 7 6 5 3 </pre>
s433290893
p00018
Wrong Answer
print ' '.join(sorted(raw_input().split(), reverse=True))
3 6 9 7 5
9 7 6 5 3
<H1>Sorting Five Numbers</H1> <p> Write a program which reads five numbers and sorts them in descending order. </p> <H2>Input</H2> <p> Input consists of five numbers <var>a</var>, <var>b</var>, <var>c</var>, <var>d</var> and <var>e</var> (-100000 &le; <var>a</var>, <var>b</var>, <var>c</var>, <var>d</var>,<var>e</var> &le; 100000). The five numbers are separeted by a space. </p> <H2>Output</H2> <p> Print the ordered numbers in a line. Adjacent numbers should be separated by a space. </p> <H2>Sample Input</H2> <pre> 3 6 9 7 5 </pre> <H2>Output for the Sample Input</H2> <pre> 9 7 6 5 3 </pre>
s765214449
p00018
Wrong Answer
print ' '.join(sorted(raw_input().strip().split(), reverse=True))
3 6 9 7 5
9 7 6 5 3
<H1>Sorting Five Numbers</H1> <p> Write a program which reads five numbers and sorts them in descending order. </p> <H2>Input</H2> <p> Input consists of five numbers <var>a</var>, <var>b</var>, <var>c</var>, <var>d</var> and <var>e</var> (-100000 &le; <var>a</var>, <var>b</var>, <var>c</var>, <var>d</var>,<var>e</var> &le; 100000). The five numbers are separeted by a space. </p> <H2>Output</H2> <p> Print the ordered numbers in a line. Adjacent numbers should be separated by a space. </p> <H2>Sample Input</H2> <pre> 3 6 9 7 5 </pre> <H2>Output for the Sample Input</H2> <pre> 9 7 6 5 3 </pre>
s954838470
p00018
Wrong Answer
print ' '.join(sorted(raw_input().split(' '), reverse=True))
3 6 9 7 5
9 7 6 5 3
<H1>Sorting Five Numbers</H1> <p> Write a program which reads five numbers and sorts them in descending order. </p> <H2>Input</H2> <p> Input consists of five numbers <var>a</var>, <var>b</var>, <var>c</var>, <var>d</var> and <var>e</var> (-100000 &le; <var>a</var>, <var>b</var>, <var>c</var>, <var>d</var>,<var>e</var> &le; 100000). The five numbers are separeted by a space. </p> <H2>Output</H2> <p> Print the ordered numbers in a line. Adjacent numbers should be separated by a space. </p> <H2>Sample Input</H2> <pre> 3 6 9 7 5 </pre> <H2>Output for the Sample Input</H2> <pre> 9 7 6 5 3 </pre>
s372947334
p00018
Wrong Answer
nums = raw_input().split() nums.sort(reverse=True) print " ".join(nums)
3 6 9 7 5
9 7 6 5 3
<H1>Sorting Five Numbers</H1> <p> Write a program which reads five numbers and sorts them in descending order. </p> <H2>Input</H2> <p> Input consists of five numbers <var>a</var>, <var>b</var>, <var>c</var>, <var>d</var> and <var>e</var> (-100000 &le; <var>a</var>, <var>b</var>, <var>c</var>, <var>d</var>,<var>e</var> &le; 100000). The five numbers are separeted by a space. </p> <H2>Output</H2> <p> Print the ordered numbers in a line. Adjacent numbers should be separated by a space. </p> <H2>Sample Input</H2> <pre> 3 6 9 7 5 </pre> <H2>Output for the Sample Input</H2> <pre> 9 7 6 5 3 </pre>
s394174037
p00018
Wrong Answer
ns = map(int, raw_input().split(" ")) count = 0 for loop in xrange(4): for i in xrange(4): if ns[i] < ns[i+1]: print ns[i+1] ns[i] , ns[i+1] = ns[i+1] , ns[i] print ns[0],ns[1],ns[2],ns[3],ns[4]
3 6 9 7 5
9 7 6 5 3
<H1>Sorting Five Numbers</H1> <p> Write a program which reads five numbers and sorts them in descending order. </p> <H2>Input</H2> <p> Input consists of five numbers <var>a</var>, <var>b</var>, <var>c</var>, <var>d</var> and <var>e</var> (-100000 &le; <var>a</var>, <var>b</var>, <var>c</var>, <var>d</var>,<var>e</var> &le; 100000). The five numbers are separeted by a space. </p> <H2>Output</H2> <p> Print the ordered numbers in a line. Adjacent numbers should be separated by a space. </p> <H2>Sample Input</H2> <pre> 3 6 9 7 5 </pre> <H2>Output for the Sample Input</H2> <pre> 9 7 6 5 3 </pre>
s959366660
p00018
Wrong Answer
print(' '.join(map(str, sorted(map(int, input().split())))))
3 6 9 7 5
9 7 6 5 3
<H1>Sorting Five Numbers</H1> <p> Write a program which reads five numbers and sorts them in descending order. </p> <H2>Input</H2> <p> Input consists of five numbers <var>a</var>, <var>b</var>, <var>c</var>, <var>d</var> and <var>e</var> (-100000 &le; <var>a</var>, <var>b</var>, <var>c</var>, <var>d</var>,<var>e</var> &le; 100000). The five numbers are separeted by a space. </p> <H2>Output</H2> <p> Print the ordered numbers in a line. Adjacent numbers should be separated by a space. </p> <H2>Sample Input</H2> <pre> 3 6 9 7 5 </pre> <H2>Output for the Sample Input</H2> <pre> 9 7 6 5 3 </pre>
s892201613
p00018
Wrong Answer
import sys for s in sys.stdin: print(' '.join(map(str, sorted(map(int, s.split())))))
3 6 9 7 5
9 7 6 5 3
<H1>Sorting Five Numbers</H1> <p> Write a program which reads five numbers and sorts them in descending order. </p> <H2>Input</H2> <p> Input consists of five numbers <var>a</var>, <var>b</var>, <var>c</var>, <var>d</var> and <var>e</var> (-100000 &le; <var>a</var>, <var>b</var>, <var>c</var>, <var>d</var>,<var>e</var> &le; 100000). The five numbers are separeted by a space. </p> <H2>Output</H2> <p> Print the ordered numbers in a line. Adjacent numbers should be separated by a space. </p> <H2>Sample Input</H2> <pre> 3 6 9 7 5 </pre> <H2>Output for the Sample Input</H2> <pre> 9 7 6 5 3 </pre>
s200929588
p00018
Accepted
s = input() s = s.split() n = [] for i in s: n.append(int(i)) isSorted = False while(not isSorted): isSorted = True for i in range(4): if n[i] < n[i + 1]: temp = n[i] n[i] = n[i + 1] n[i + 1] = temp isSorted = False print(n[0],n[1],n[2],n[3],n[4])
3 6 9 7 5
9 7 6 5 3
<H1>Sorting Five Numbers</H1> <p> Write a program which reads five numbers and sorts them in descending order. </p> <H2>Input</H2> <p> Input consists of five numbers <var>a</var>, <var>b</var>, <var>c</var>, <var>d</var> and <var>e</var> (-100000 &le; <var>a</var>, <var>b</var>, <var>c</var>, <var>d</var>,<var>e</var> &le; 100000). The five numbers are separeted by a space. </p> <H2>Output</H2> <p> Print the ordered numbers in a line. Adjacent numbers should be separated by a space. </p> <H2>Sample Input</H2> <pre> 3 6 9 7 5 </pre> <H2>Output for the Sample Input</H2> <pre> 9 7 6 5 3 </pre>
s583977792
p00018
Accepted
n = map(int, raw_input().split()) n.sort(reverse=True) for i in n: print i,
3 6 9 7 5
9 7 6 5 3
<H1>Sorting Five Numbers</H1> <p> Write a program which reads five numbers and sorts them in descending order. </p> <H2>Input</H2> <p> Input consists of five numbers <var>a</var>, <var>b</var>, <var>c</var>, <var>d</var> and <var>e</var> (-100000 &le; <var>a</var>, <var>b</var>, <var>c</var>, <var>d</var>,<var>e</var> &le; 100000). The five numbers are separeted by a space. </p> <H2>Output</H2> <p> Print the ordered numbers in a line. Adjacent numbers should be separated by a space. </p> <H2>Sample Input</H2> <pre> 3 6 9 7 5 </pre> <H2>Output for the Sample Input</H2> <pre> 9 7 6 5 3 </pre>
s475581543
p00018
Accepted
a = list(map(int, (input().split()))) a = sorted(a, reverse=True) for i in range(4): print(a[i],end=' ') print(a[4])
3 6 9 7 5
9 7 6 5 3
<H1>Sorting Five Numbers</H1> <p> Write a program which reads five numbers and sorts them in descending order. </p> <H2>Input</H2> <p> Input consists of five numbers <var>a</var>, <var>b</var>, <var>c</var>, <var>d</var> and <var>e</var> (-100000 &le; <var>a</var>, <var>b</var>, <var>c</var>, <var>d</var>,<var>e</var> &le; 100000). The five numbers are separeted by a space. </p> <H2>Output</H2> <p> Print the ordered numbers in a line. Adjacent numbers should be separated by a space. </p> <H2>Sample Input</H2> <pre> 3 6 9 7 5 </pre> <H2>Output for the Sample Input</H2> <pre> 9 7 6 5 3 </pre>
s432110158
p00018
Accepted
n = map(int, raw_input().split()) n.sort(reverse = True) for i in range(len(n)): print(n[i]), print
3 6 9 7 5
9 7 6 5 3
<H1>Sorting Five Numbers</H1> <p> Write a program which reads five numbers and sorts them in descending order. </p> <H2>Input</H2> <p> Input consists of five numbers <var>a</var>, <var>b</var>, <var>c</var>, <var>d</var> and <var>e</var> (-100000 &le; <var>a</var>, <var>b</var>, <var>c</var>, <var>d</var>,<var>e</var> &le; 100000). The five numbers are separeted by a space. </p> <H2>Output</H2> <p> Print the ordered numbers in a line. Adjacent numbers should be separated by a space. </p> <H2>Sample Input</H2> <pre> 3 6 9 7 5 </pre> <H2>Output for the Sample Input</H2> <pre> 9 7 6 5 3 </pre>
s371536619
p00018
Accepted
while True: try: print "%d %d %d %d %d" % tuple(sorted(list(map(eval,raw_input().split())),reverse=True)) except EOFError: break
3 6 9 7 5
9 7 6 5 3
<H1>Sorting Five Numbers</H1> <p> Write a program which reads five numbers and sorts them in descending order. </p> <H2>Input</H2> <p> Input consists of five numbers <var>a</var>, <var>b</var>, <var>c</var>, <var>d</var> and <var>e</var> (-100000 &le; <var>a</var>, <var>b</var>, <var>c</var>, <var>d</var>,<var>e</var> &le; 100000). The five numbers are separeted by a space. </p> <H2>Output</H2> <p> Print the ordered numbers in a line. Adjacent numbers should be separated by a space. </p> <H2>Sample Input</H2> <pre> 3 6 9 7 5 </pre> <H2>Output for the Sample Input</H2> <pre> 9 7 6 5 3 </pre>
s545188574
p00018
Accepted
#!/usr/bin/env python # -*- coding: utf-8 -*- import sys for s in sys.stdin: d = map(int , s.split()) d.sort() d.reverse() for e in d: print e,
3 6 9 7 5
9 7 6 5 3
<H1>Sorting Five Numbers</H1> <p> Write a program which reads five numbers and sorts them in descending order. </p> <H2>Input</H2> <p> Input consists of five numbers <var>a</var>, <var>b</var>, <var>c</var>, <var>d</var> and <var>e</var> (-100000 &le; <var>a</var>, <var>b</var>, <var>c</var>, <var>d</var>,<var>e</var> &le; 100000). The five numbers are separeted by a space. </p> <H2>Output</H2> <p> Print the ordered numbers in a line. Adjacent numbers should be separated by a space. </p> <H2>Sample Input</H2> <pre> 3 6 9 7 5 </pre> <H2>Output for the Sample Input</H2> <pre> 9 7 6 5 3 </pre>
s651794634
p00018
Accepted
lis=list(map(int,input().split())) lis.sort() for i in range(4,-1,-1): if i!=4: print(" ",end="") print(lis[i],end="") print("")
3 6 9 7 5
9 7 6 5 3
<H1>Sorting Five Numbers</H1> <p> Write a program which reads five numbers and sorts them in descending order. </p> <H2>Input</H2> <p> Input consists of five numbers <var>a</var>, <var>b</var>, <var>c</var>, <var>d</var> and <var>e</var> (-100000 &le; <var>a</var>, <var>b</var>, <var>c</var>, <var>d</var>,<var>e</var> &le; 100000). The five numbers are separeted by a space. </p> <H2>Output</H2> <p> Print the ordered numbers in a line. Adjacent numbers should be separated by a space. </p> <H2>Sample Input</H2> <pre> 3 6 9 7 5 </pre> <H2>Output for the Sample Input</H2> <pre> 9 7 6 5 3 </pre>
s149834408
p00018
Accepted
print(*sorted(list(map(int, input().split())))[::-1])
3 6 9 7 5
9 7 6 5 3
<H1>Sorting Five Numbers</H1> <p> Write a program which reads five numbers and sorts them in descending order. </p> <H2>Input</H2> <p> Input consists of five numbers <var>a</var>, <var>b</var>, <var>c</var>, <var>d</var> and <var>e</var> (-100000 &le; <var>a</var>, <var>b</var>, <var>c</var>, <var>d</var>,<var>e</var> &le; 100000). The five numbers are separeted by a space. </p> <H2>Output</H2> <p> Print the ordered numbers in a line. Adjacent numbers should be separated by a space. </p> <H2>Sample Input</H2> <pre> 3 6 9 7 5 </pre> <H2>Output for the Sample Input</H2> <pre> 9 7 6 5 3 </pre>