fork download
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main() {
  5. // your code goes here
  6. int n;
  7. cin>>n;
  8. int i;
  9. int count=0;
  10. for(i=1;i<=n;i++)
  11. {
  12. if(n%i==0)
  13. {
  14. count++;
  15. }
  16. }
  17. cout<<count;
  18. return 0;
  19. }
Success #stdin #stdout 0s 5276KB
stdin
10
stdout
4