Smallest Positive Integer
Practice
4.1 (9 votes)
Mathematics
Easy Medium
Problem
90% Success 13668 Attempts 30 Points 1s Time Limit 256MB Memory 1024 KB Max Code

Given a number X between 0 to 1000000006 find smallest positive integer Y such that the products of digits of Y modulo 1000000007 is X.

Input Format

A single integer - X

Output Format

A single integer - Y

Input Constraint

0 <= X <= 1000000006

Problem Setter: Practo Tech Team

Please login to use the editor

You need to be logged in to access the code editor

Loading...

Please wait while we load the editor

Loading...
Results
Custom Input
Run your code to see the output
Submissions
Please login to view your submissions
Similar Problems
Points:30
191 votes
Tags:
Binary search algorithmNumber TheoryHiringEasy-MediumReadyOpenApproved
Points:20
21 votes
Tags:
ApprovedCombinatoricsDynamic ProgrammingEasyMathOpen
Points:50
2 votes
Tags:
AlgorithmsApprovedBit ManipulationFenwick treeHardOpenTrees
Editorial

No editorial available for this problem.