Skip to content

Instantly share code, notes, and snippets.

@jonatasemidio
Created April 17, 2012 19:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jonatasemidio/2408632 to your computer and use it in GitHub Desktop.
Save jonatasemidio/2408632 to your computer and use it in GitHub Desktop.
Google Code Jam
d={'z':'q','q':'z','\n':'\n',' ':' ','a':'y','c':'e','b':'h','e':'o','d':'s','g':'v','f':'c','i':'d','h':'x','k':'i','j':'u','m':'l','l':'g','o':'k','n':'b','p':'r','s':'n','r':'t','u':'j','t':'w','w':'f','v':'p','y':'a','x':'m'}
inf=open('file.in')
l1=int(inf.readline())
ouf=open('file.out','w')
def trans(l):
return ''.join(d[x] for x in l)
for i in range(l1):
ouf.write('Case #%s: %s'%(i+1, trans(inf.readline())))
@jonatasemidio
Copy link
Author

Resolução do problema A do Code Jam 2012 em python.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment