Largest palindrome product: Difference between revisions
Content added Content deleted
m (→{{header|Ring}}: keeping it odd) |
(→{{header|XPL0}}: faster version (226 vs. 99 ms on Pi4)) |
||
Line 255: | Line 255: | ||
[Max:= 0; |
[Max:= 0; |
||
for M:= 100 to 999 do |
for M:= 100 to 999 do |
||
for N:= |
for N:= M to 999 do |
||
[Prod:= M*N; |
[Prod:= M*N; |
||
if Prod = Rev( |
if Prod/1000 = Rev(rem(0)) then |
||
if Prod > Max then Max:= Prod; |
if Prod > Max then Max:= Prod; |
||
]; |
]; |