题解 | #质数因子#
质数因子
https://www.nowcoder.com/practice/196534628ca6490ebce2e336b47b3607
#include <stdio.h> int main() { int a; scanf("%d", &a); int i; for (i = 2; i * i <= a; i++) { while (a % i == 0) { a /= i; printf("%d ", i); } } if(a > 1) printf("%d ", a); return 0; }