Skip to content

Instantly share code, notes, and snippets.

@ffbit
Created August 22, 2012 21:54
Show Gist options
  • Select an option

  • Save ffbit/3429736 to your computer and use it in GitHub Desktop.

Select an option

Save ffbit/3429736 to your computer and use it in GitHub Desktop.
Calculating time for the Algorithm course
import math
time = (3.3E-4, 5.0E-9, 6.25E-9)
data = (1, 2, 4, 8, 16, 32, 64)
for t in time:
print("== %s ==" % t)
for d in data:
result = math.pow(d * 1000, 2) * t
print("%s %f" % (d, result))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment