Advertisement
Guest User

Untitled

a guest
Nov 28th, 2015
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.72 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <iostream>
  3. #include <cmath>
  4. #include <vector>
  5. #include <set>
  6. #include <map>
  7. #include <unordered_map>
  8. #include <algorithm>
  9. #include <string>
  10. #include <string.h>
  11.  
  12. typedef long long ll;
  13. const int N = 1e5+3;
  14.  
  15. using namespace std;
  16.  
  17. int main()
  18. {
  19.     //freopen("input.txt", "r", stdin);
  20.     ll n ;
  21.     scanf("%lld", &n);
  22.     ll ans =0 ;
  23.     for (ll i = 1; i*i <= n; ++i)
  24.         if (n%i==0) {
  25.             ll x = n/i;
  26.           //  printf("%lld\n", x);
  27.             for (ll j = i; j*j <=x; ++j)
  28.                 if (x%j==0) {
  29.                     ans++;
  30.        //             printf("%lld %lld %lld\n", i,j,x/j);
  31.                 }
  32.         }
  33.     printf("%lld\n",ans);
  34.     return 0;
  35. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement