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