Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <string.h>
- #include <math.h>
- #include <stdlib.h>
- int main() {
- long long int n, i;
- while(scanf("%lld", &n) != EOF){
- int k;
- int nmrdivisores1 = 0;
- int nmrdivisores2 = 0;
- for(k = 1; k <= sqrt(n); k++){
- if(n%k == 0 && n!= k*k){
- nmrdivisores1 = nmrdivisores1 + 2;
- }else if (n%k == 0 && n == k*k)
- nmrdivisores2 = nmrdivisores2 + 2;
- }printf("%lld\n", nmrdivisores1);
- printf("%lld", nmrdivisores2 - 1);
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement