Intro
Two numbers are a reversed multiple pair if they satisfy the following property:
$$ a\cdot b = \operatorname{reversed}( (a-1)\cdot b ) $$
Here, \$\operatorname{reversed}()\$ means to reverse the digits of a number (e. g 123
becomes 321
.)
Example
$$ a=6,\quad b=9,\quad 6\cdot 9=54,\quad 5\cdot 9=45 $$
As you can see, \$45\$ is the reversed version of \$54\$.
Task
Given two integers, \$a\$ and \$b\$, output if these two numbers is a reversed multiple pair.
Test Cases
6 9 => True
4 5 => False
3 2178 => True
34 2079 => True
7 8 => False
600 100 => False
46 1089 => True
817 503 => False
6 9009 => True
321 81 => False
10 1089 => False
Shortest code wins!
321 81 => False
. An answer checkingb
for divisibility with 9 will pass all existing test cases but not this one. \$\endgroup\$10 1089
truthy or falsy? Currently, different answers don't agree on this testcase. \$\endgroup\$-5 9
? \$\endgroup\$