1096. Consecutive Factors (20)
时间限制
400 ms
内存限制
65536 kB
代码长度限制
16000 B
判题程序
Standard
作者
CHEN, Yue
Among all the factors of a positive integer N, there may exist several consecutive numbers. For example, 630 can be factored as 3*5*6*7, where 5, 6, and 7 are the three consecutive numbers. Now given any positive N, you are supposed to find the maximum number of consecutive factors, and list the smallest sequence of the consecutive factors.
Input Specification:
Each input file contains one test case, which gives the integer N (1<N<231).
Output Specification:
For each test case, print in the first line the maximum number of consecutive factors. Then in the second line, print the smallest sequence of the consecutive factors in the format "factor[1]*factor[2]*...*factor[k]", where the factors are listed in increasing order, and 1 is NOT included.
Sample Input:
630
Sample Output:
3 5*6*7
输入N;
(找到一个数是N的因数,且由最多的连续的数乘起来的【这些数不包括1】;如果有多个,那么输出第一个比较小的);
输出格式
这个数有几个连续的数乘起来
这些数是哪些(从小到大),中间间隔*
例如:
N=得到
1
2
N=12
2
2*3
N=5
1
5
评测结果
时间 | 结果 | 得分 | 题目 | 语言 | 用时(ms) | 内存(kB) | 用户 |
8月19日 18:07 | 答案正确 | 20 | 1096 | 1 | 384 |
测试点
测试点 | 结果 | 用时(ms) | 内存(kB) | 得分/满分 |
0 | 答案正确 | 1 | 308 | 10/10 |
1 | 答案正确 | 1 | 384 | 2/2 |
2 | 答案正确 | 1 | 308 | 2/2 |
3 | 答案正确 | 1 | 384 | 2/2 |
4 | 答案正确 | 1 | 180 | 2/2 |
5 | 答案正确 | 1 | 308 | 1/1 |
6 | 答案正确 | 1 | 180 | 1/1 |
















