fork download
  1. #include <bits/stdc++.h>
  2. using namespace std;
  3. const int N = 1e7 + 7;
  4.  
  5. static long long uoc[N];
  6.  
  7. void solution(){
  8.  
  9. uoc[1] = 1;
  10. long long i,j;
  11. for( i = 2;i <= sqrt(N);i++){
  12. uoc[i*i] += 1;
  13. for( j = i + 1;j <= N/i;j++){
  14. uoc[i*j] += 2;
  15. }
  16. }
  17. }
  18.  
  19. int main()
  20. {
  21. //freopen("1.inp","r",stdin);
  22. //freopen("1.out","w",stdout);
  23. ios_base::sync_with_stdio(0);
  24. cin.tie(0); cout.tie(0);
  25.  
  26. solution();
  27.  
  28. return 0;
  29. }
Success #stdin #stdout 0.63s 81584KB
stdin
Standard input is empty
stdout
Standard output is empty