Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<bits/stdc++.h>
- using namespace std;
- typedef long long int ll;
- vector<ll> divisors[1000005];
- int mark[10000]={0};
- void Divisor(ll n)
- {
- for(ll i=1;i<=n;i++)
- {
- for(ll j=i;j<=n;j+=i)divisors[j].push_back(i);
- }
- return;
- }
- int main()
- {
- ios_base::sync_with_stdio(false);
- cin.tie(NULL);
- #ifndef ONLINE_JUDGE
- freopen("input.cpp","r",stdin);
- #endif // ONLINE_JUDGE
- Divisor(1000000);
- for(int i=1;i<=1000000;i++)
- {
- if(divisors[i].size()%2==1)
- {
- //cout<<i<<" : "<<divisors[i].size()<<endl;
- mark[divisors[i].size()]++;
- }
- }
- for(int i=0;i<=10000;i++)if(mark[i])cout<<i<<" : "<<mark[i]<<endl;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement