Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit e150b77

Browse files
authored
Merge pull request #87 from MaximSmolskiy/improve_project_euler_problem_4
Improve Project Euler problem 4
2 parents 39d5f9c + d00e0a8 commit e150b77

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

‎project-euler/Problem4/solv.m‎

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,8 @@
55
product = number1 * number2; % builds the new product
66

77
% make sure product is a palindrome number.
8-
if (isPalindromeNumber(product))
9-
if (product > maxPalindrome)
10-
maxPalindrome = product;
11-
endif
8+
if (product > maxPalindrome && isPalindromeNumber(product))
9+
maxPalindrome = product;
1210
endif
1311
endfor
1412
endfor

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /