EulerProblem4

From GIS CS4
Jump to: navigation, search

The following is the code to solve Euler's problem 4:

01   n = 0
02   for i in range(9, 1, -1):
03      for j in range (i, 1, -1):
04          m = i * j
05          if m > n:
06              s = str(m)
07              if s == s[::-1]:
08                  n = m
09   print n

Use the table below to fill in the values for each consecutive iteration of the loop:

Variable i j m n m > n s s[::-1]
1
2
3
4
5
6
7
8
9
10
11