Skip to content

Instantly share code, notes, and snippets.

@joshkehn
Last active December 16, 2015 01:59
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 joshkehn/5359035 to your computer and use it in GitHub Desktop.
Save joshkehn/5359035 to your computer and use it in GitHub Desktop.
Example for a bitcoin article I'm writing
__author__ = "Joshua Kehn <josh@kehn.us>"
import sys
looking_for = "123456"
multiple = 7
for i in xrange(int(looking_for), sys.maxint):
s = multiple * i
if str(s).endswith(looking_for):
print "Found multiple: {0}".format(i)
break
else:
print "No multiple found."
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment