45 人解决,78 人已尝试。
71 份提交通过,共有 318 份提交。
5.1 EMB 奖励。
单点时限: 6.0 sec
内存限制: 256 MB
Given an integer N, write a program to find the minimal positive integer K such that the product of the digits of K is exactly N.
There are several tests. Each test consists of an integer N(0 <= N <= 10^9) on a single line. Input is terminated by end of file.
For each integer in the input, print in a single line the corresponding number K. If such a K doesn’t exist, print -1 instead. No other characters are allowed in the output.
15 5
35 5
45 人解决,78 人已尝试。
71 份提交通过,共有 318 份提交。
5.1 EMB 奖励。