fork download
  1. #include <bits/stdc++.h>
  2. using namespace std;
  3. #define ll long long
  4.  
  5. int main() {
  6. ll n; cin >> n;
  7.  
  8. int score = 0;
  9. for (int i = 2; i*i <= n; i++) {
  10. while (n % i == 0) {
  11. n /= i;
  12. score++;
  13. }
  14. }
  15.  
  16. if (n > 1) score++;
  17.  
  18. cout << score;
  19. }
Success #stdin #stdout 0.01s 5324KB
stdin
Standard input is empty
stdout
9