# SP4942 FACT0 - Integer Factorization (15 digits)

• 1通过
• 4提交
• 题目来源
• 评测方式 RemoteJudge
• 标签
• 难度 尚无评定
• 时空限制 1138ms / 1536MB
• 提示：收藏到任务计划后，可在首页查看。

## 推荐的相关题目 显示

本题征求翻译。如果你能提供翻译或者题意简述，请 提交翻译 ，感谢你的贡献。

## 题目描述

This is a problem to test the robustness of your Integer Factorization algorithm.

Given some integers, you need to factor them into product of prime numbers.

The largest integer given in the input file has 15 digits. FACT1 is a harder version of this problem (the numbers are larger).

You may need to use a general factorization algorithm since no special numbers (e.g. Fermat numbers) are considered when designing the input data.

## 输入输出格式

输入格式：

There are several numbers given, each one in a line.

The input ends with a number 0.

The number of test cases is about 10.

输出格式：

For each number, print in a line the factorization of it. See examples below for the output format.

## 输入输出样例

输入样例#1： 复制
3111989
13091989
77145199750673
0
输出样例#1： 复制
317^1 9817^1
17^2 89^1 509^1
328439^1 234884407^1
提示
标程仅供做题后或实在无思路时参考。
请自觉、自律地使用该功能并请对自己的学习负责。
如果发现恶意抄袭标程，将按照I类违反进行处理。