Advertisement
Guest User

Untitled

a guest
Mar 21st, 2019
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.56 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <string.h>
  3. #include <math.h>
  4. #include <stdlib.h>
  5.  
  6. int main() {
  7. long long int n, i;
  8. while(scanf("%lld", &n) != EOF){
  9. int k;
  10. int nmrdivisores1 = 0;
  11. int nmrdivisores2 = 0;
  12. for(k = 1; k <= sqrt(n); k++){
  13. if(n%k == 0 && n!= k*k){
  14. nmrdivisores1 = nmrdivisores1 + 2;
  15. }else if (n%k == 0 && n == k*k)
  16. nmrdivisores2 = nmrdivisores2 + 2;
  17. }printf("%lld\n", nmrdivisores1);
  18. printf("%lld", nmrdivisores2 - 1);
  19. }
  20. return 0;
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement