Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- let s = 0;
- function palindrome(s) {
- return (s + "").split("").toReversed().join("") == s;
- }
- for (let i = 100; i <= 999; i++) {
- for (let j = 100; j <= 999; j++) {
- if (palindrome(i * j)) s = Math.max(s, i * j);
- }
- }
- console.log(s);
Advertisement
Add Comment
Please, Sign In to add comment