Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

ps1 verification

  • Loading branch information...
commit d61c8deb9bbea7250e3723b6a2c97fdede953c90 1 parent c5b6c83
@ssadler authored
Showing with 12 additions and 0 deletions.
  1. +12 −0 ps1.py
View
12 ps1.py
@@ -0,0 +1,12 @@
+import sys
+from math import log
+
+funcs = {
+ 'a': lambda n: 2 ** (2 ** n),
+ 'b': lambda n: 2 ** (n ** 2),
+ 'c': lambda n: n ** 2 * log(n),
+ 'd': lambda n: n,
+ 'e': lambda n: n ** (2 ** n),
+}
+
+print '\n'.join("%s\t%s" % (a, b) for b, a in sorted((funcs[l](int(sys.argv[2])), l) for l in 'abcde'))
Please sign in to comment.
Something went wrong with that request. Please try again.