Find the smallest number leading to a maximal product of two numbers that concatenate to another number - MATLAB Cody - MATLAB Central

Problem 58977. Find the smallest number leading to a maximal product of two numbers that concatenate to another number

Difficulty:Rate
Cody Problem 58971 involves the maximal product of numbers that concatenate to a number n. For example, if n = 1234, then the products are 1x234 = 234, 12x34 = 408, and 123x4 = 492, and the maximal product is 492. For n < 10, the maximal product is zero.
This problem seeks the smallest number leading to a given maximal product. If the product is 492, the smallest number is 682. Some products have no solution. For example, 13 is a product of both 113 and 131, but the maximal products are 33 and 31, respectively.
Write a function that takes a maximal product and returns the smallest number leading to that product. If the product has no corresponding number, return the empty set.

Solution Stats

54.55% Correct | 45.45% Incorrect
Last Solution submitted on Dec 07, 2023

Problem Comments

Solution Comments

Show comments
R2025a Pre-release highlights
This topic is for discussing highlights to the current R2025a Pre-release.
18
8

Problem Recent Solvers5

Suggested Problems

More from this Author291

Problem Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
Go to top of page