A Brilliant number is defined as a number with two prime factors, both of which have the same number of digits. Some examples:
10=2*5. Since 2 and 5 have the same number of digits, 10 is a brilliant number.
22=2*11. Although there are two prime factors, they have a different number of digits, so 22 is not a brilliant number.
30=2*3*5. Although each prime factor has the same number of digits, there are more than two of them, so 30 is not a brilliant number.
Given a number, write a MATLAB script to determine if the number is brilliant or not.
Solution Stats
Problem Comments
Solution Comments
Show commentsProblem Recent Solvers66
Suggested Problems
-
Number of 1s in the Binary Representation of a Number
483 Solvers
-
Create a cell array out of a struct
2556 Solvers
-
Determine the number of odd integers in a vector
838 Solvers
-
167 Solvers
-
Find the next Fibonacci number
922 Solvers
More from this Author80
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!