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
Sample Input
16
Sample Output
28
Explanation
If x is 16 then y is 28 as (2*8)%1000000007 = 16
Code Editor
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
Submissions
Please login to view your submissions
Similar Problems
Points:30
176 votes
Tags:
Dynamic ProgrammingApprovedEasy-Medium
2.Swap It
Points:20
34 votes
Tags:
AlgorithmsApprovedEasyGreedy AlgorithmsOpen
Points:30
21 votes
Tags:
MediumApprovedReadyMathematicsOpenProbability and Statistics
Editorial
No editorial available for this problem.
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