Skip to content

Instantly share code, notes, and snippets.

@ameerkat
Created April 17, 2012 00:41
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 ameerkat/2402593 to your computer and use it in GitHub Desktop.
Save ameerkat/2402593 to your computer and use it in GitHub Desktop.
2012 Code Jam Qualifier A
d = {}
s1 = "yeqz ejp mysljylc kd kxveddknmc re jsicpdrysi rbcpc ypc rtcsra dkh wyfrepkym veddknkmkrkcd de kr kd eoya kw aej tysr re ujdr lkgc jv"
s2 = "aozq our language is impossible to understand there are twenty six factorial possibilities so it is okay if you want to just give up"
for ch in range(len(s1)):
d[s1[ch]] = s2[ch]
f = open("A.in")
t = int(f.readline().strip())
for i in range(1,t+1):
print "Case #"+ str(i) + ": " + ''.join([(d[ch] if ch in d else ch) for ch in f.readline()]),
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment