Advertisement
heian

Untitled

Oct 16th, 2019
132
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.38 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. using namespace std;
  4.  
  5. int main()
  6. {
  7. int n,ogl,nrd,d;
  8. cin>>n;
  9. ogl=0;
  10. while(n!=0)
  11. {
  12. ogl=ogl*10+n%10;
  13. n=n/10;
  14. }
  15. ///cout<<ogl<<"\n";
  16.  
  17. d=1;
  18. nrd=0;
  19. while(d<=ogl/2)
  20. {
  21. if(ogl % d == 0)
  22. nrd = nrd+1;
  23. d++;
  24. }
  25. nrd++;
  26. cout<<nrd<<"\n";
  27.  
  28. return 0;
  29. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement