Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<iostream>
- #include<cmath>
- #include<climits>
- using namespace std;
- int main()
- {
- int n, i, r, d, c=0, cmax=INT_MIN;
- cin>>n;
- for(i=1; i<=n; i++)
- {
- r=sqrt(i);
- for(d=1; d<=r; d++)
- {
- if(i%d==0)
- {
- c++;
- }
- }
- if(c>cmax)
- {
- cmax=c;
- }
- }
- cout<<
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement