題解 | #質因數(shù)的個數(shù)#
質因數(shù)的個數(shù)
http://fangfengwang8.cn/practice/20426b85f7fc4ba8b0844cc04807fbd9
#include <stdio.h> int main() { int n; while(scanf("%d",&n)!=EOF){ int count=0; int i=2; while(n>1){ if(n%i==0){ count++; n/=i; i=2; } else{ i++; } } printf("%d\n",count); } return 0; }