Created
July 26, 2012 05:48
-
-
Save yasuharu519/3180474 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding:utf-8 -*- | |
def isCyclicNum(num): | |
if str(num) == str(num)[::-1]: | |
return True | |
else: | |
return False | |
def main(): | |
ans = 0 | |
for i in xrange(999, 99, -1): | |
for j in xrange(999, 99, -1): | |
if ans > i*j: | |
continue | |
if isCyclicNum(i * j): | |
ans = max(ans, i * j) | |
return ans | |
if __name__ == "__main__": | |
print main() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment