From 95341b61b030c9e1290f3b326cb7ec584f543aea Mon Sep 17 00:00:00 2001 From: Reiner Herrmann Date: Sun, 31 Aug 2014 20:21:45 +0200 Subject: moved files to higher directory after split to new repository --- 055.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 055.py (limited to '055.py') diff --git a/055.py b/055.py new file mode 100644 index 0000000..d623d9b --- /dev/null +++ b/055.py @@ -0,0 +1,17 @@ + +def lychrel(x): + for i in xrange(50): + t = x + int(str(x)[::-1]) + if t == int(str(t)[::-1]): + return False + x = t + return True + +count = 0 + +for i in xrange(1, 10000): + if lychrel(i): + count += 1 + +print count + -- cgit v1.2.3