Skip to content

Instantly share code, notes, and snippets.

@hodlbirb
Created February 3, 2017 11:03
Show Gist options
  • Save hodlbirb/02777e7de62c4084cc608c47ded53116 to your computer and use it in GitHub Desktop.
Save hodlbirb/02777e7de62c4084cc608c47ded53116 to your computer and use it in GitHub Desktop.
Output: 994009
def main():
memo = 0
for i in range(1, 999):
for j in reversed(range(1,999)):
temp = i * j
s = str(temp)
if (s[0] == s[-1] and temp > memo):
memo = temp
print(memo)
if __name__ == "__main__":
main()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment