Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
(10^1000) などの非常に大きな数の因数を見つける必要があります。つまり、入力が 100 の場合、(10*10=100) であるため、出力は 10 10 である必要があります。N<=(long) のサイズの場合、これは非常に単純ですが、非常に大きな数の因数を見つける方法を知りたいです。 (10^1000) と言います。また、私は Big Integer を使用できません。.
10^1000 には正確に 1,002,001 個の整数約数があり、少し考えれば簡単に見つけることができます。素因数分解は
2 * 2 * 2 * ... * 5 * 5 * 5
ちょうど 1,000 個の 2 とちょうど 1,000 個の 5 があります。