Given two numbers a and b, determine if the product ab is a permutation of the digits of a. For example, this is always true for a=0. Less trivially, 125874*2=251748.
If the product, ab, has more digits than a, append zeros to the front of a so they have the same number of digits. Thus, for example, 015*7=105 is another example.
This problem was inspired by seeing a student simplify 163/326 to 1/2 by cancelling out the digits in common.
Solution Stats
Problem Comments
Solution Comments
Show comments
Loading...
Problem Recent Solvers57
Suggested Problems
-
Find all elements less than 0 or greater than 10 and replace them with NaN
15808 Solvers
-
Construct an index vector from two input vectors in vectorized fashion
460 Solvers
-
856 Solvers
-
398 Solvers
-
Flip the vector from right to left
11253 Solvers
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!