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