Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <cstdio>
- using namespace std;
- int main()
- {
- freopen("nenepatrat.in", "r", stdin);
- freopen("nenepatrat.out", "w", stdout);
- int n, sol1 = 1, d = 2, p, sol2 = 1;
- scanf("%d", &n);
- while(d * d <= n) {
- p = 0;
- if(n % d == 0) {
- while(n % d == 0) {
- n /= d;
- p++;
- }
- sol1 *= (2 * p + 1);
- sol2 *= (p + 1);
- }
- d++;
- }
- if(n > 1) {
- sol1 *= 3;
- sol2 *= 2;
- }
- printf("%d", (sol1 - 2 * sol2 + 1) / 2);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement