4 solutions
- 1
Information
- ID
- 22
- Time
- 1000ms
- Memory
- 128MiB
- Difficulty
- 6
- Tags
- # Submissions
- 22
- Accepted
- 12
- Uploaded By
#include <iostream>
using namespace std;
int main(){
int A;
cin>>A;
int a=0;
for(int d=1;d*d<=A;d++){
if (A%d==0){
a++;
}
}
cout<<a<<endl;
return 0;
}
#include<bits/stdc++.h>
using namespace std;
int main()
{
int s,n=0;
cin>>s;
for(int i=1;i<=s;i++)
for(int j=i;j<=s;j++)
if(i*j==s)
n++;
cout<<n;
}
C++ :
#include<bits/stdc++.h>
using namespace std;
int main(){
int b;
cin>>b;
int a=0;
for (int i=1; i*i<=b;i++) {
if (b%i==0){
a+=1;
}
}
cout<<a;
}
By signing up a Hydro universal account, you can submit code and join discussions in all online judging services provided by us.