Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <bits/stdc++.h>
- using namespace std;
- long long ans(long long x)
- {
- long long res = 0;
- for (int i = 1 ; i <= sqrt(x) ; i ++)
- if (x % i == 0)
- {
- res++;
- if (i * i != x)
- res++;
- }
- return res;
- }
- int main()
- {
- long long a; cin >> a;
- cout << ans(a) << endl;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement