Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main() {
- int x,d=2,e,nrd=1;
- cin>>x;
- while(x!=1){
- e=0;
- while(x%d==0){
- x=x/d;
- e++; ///cresc exponentul lui d
- }
- if(e!=0){
- nrd=nrd*(e+1);
- }
- d++; ///testez urmatorul factor prim
- }
- cout<<nrd;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement