RECTANGLES SPOJ SOLUTION

*/ "AE00" SPOJ SOLUTION */
#include<bits/stdc++.h>
using namespace std;
int main()
{
int i,j,c=0;
int n;
cin>>n;
for(i=2;i<=sqrt(n);i++)
 {for(j=i;(j*i)<=n;j++)
      c++;}
cout<<n+c;
return 0;
}

Comments

Popular posts from this blog

TDPRIMES SPOJ SOLUTION

Spoj CLOPPAIR Solution