[GSEP202309 五级] 因数分解
You cannot submit for this problem because the contest is ended. You can click "Open in Problem Set" to view this problem in normal mode.
题目描述
每个正整数都可以分解成素数的乘积,例如: ,。
现在,给定一个正整数,请按要求输出它的因数分解式。
输入格式
输入第一行,包含一个正整数 。约定 。
输出格式
输出一行,为的因数分解式。要求按质因数由小到大排列,乘号用星号 * 表示,且左右各空一格。当且仅当一个素数出现多次时,将它们合并为指数形式,用上箭头 ^ 表示,且左右不空格。
输入输出样例 #1
输入 #1
6
输出 #1
2 * 3
输入输出样例 #2
输入 #2
20
输出 #2
2^2 * 5
输入输出样例 #3
输入 #3
23
输出 #3
23
入门B组(6)——队列
- Status
 - Done
 - Problem
 - 4
 - Open Since
 - 2025-3-2 17:30
 - Deadline
 - 2025-3-10 23:59
 - Extension
 - 24 hour(s)