SP4948 FACT2 - Integer Factorization (29 digits)

    • 1通过
    • 1提交
  • 题目来源 SPOJ 4948
  • 评测方式 RemoteJudge
  • 标签
  • 难度 尚无评定
  • 时空限制 2013ms / 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 29 digits.

    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
    2432902008176640000
    77145199750673
    0
    输出样例#1: 复制
    317^1 9817^1
    17^2 89^1 509^1
    2^18 3^8 5^4 7^2 11^1 13^1 17^1 19^1
    328439^1 234884407^1
    提示
    标程仅供做题后或实在无思路时参考。
    请自觉、自律地使用该功能并请对自己的学习负责。
    如果发现恶意抄袭标程,将按照I类违反进行处理。