Problem 1742. Generate a Parasitic Number
Solution Stats
Problem Comments
-
3 Comments
As per the wiki page provided in problem 156 "leading zeros are not allowed". Thus the solution set here is flawed.
Chris, you are correct. The definition of a parasitic number does state "No Leading Zeros." That's why I explicitly stated that some of these values would have a leading zero, and when they would occur. While these numbers are technically not parasitic, the method for generating them is the same.
My solution works ok from the scratchpad, but only test 6 passes. I put my scratchpad inputs in Solution 8750070. I copied the y_correct values from the test cases, and all te isequal calls return true. Any idea why they fail, and why test 6 passes?
Solution Comments
Show commentsGroup

Magic Numbers
- 19 Problems
- 84 Finishers
- Find the 9's Complement
- Bell Number calculator
- Is this number Munchhausen?
- Smith numbers
- Generate a Parasitic Number
- Armstrong Number
- nth Rational Number
- Generate a Parasitic Number
- Compute Fibonacci Number
- Find vampire numbers
- N-th Odious
- Evil Number
- Armstrong Number
- Generalised Hamming Number
- Polite numbers. Politeness.
- Polite numbers. N-th polite number.
- Bell Number calculator
- Narcissistic number ?
- Is this number Munchhausen?
- Compute Fibonacci Number
- Smith numbers
- Find vampire numbers
- Polygonal numbers
- Generate a Parasitic Number
- nth Rational Number
- Kaprekar numbers
- Parasitic numbers
- Determine if a Given Number is a Triangle Number
Problem Recent Solvers88
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!