Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<bits/stdc++.h>
- using namespace std;
- int main()
- {
- long long int n,L,res1,res2,t,m=0,j;
- scanf("%lld",&t);
- while(t-- && scanf("%lld",&n)==1)
- {
- L=n/2;
- res1=0;
- res2=0;
- for(j=2; j<=L; j=j*2)
- {
- if(n%j==0)
- {
- res1=n/j;
- if(res1%2==1)
- {
- res2=j;
- break;
- }
- }
- }
- if(res2!=0)
- {
- printf("Case %lld: %lld %lld\n",++m,res1,res2);
- }
- else
- {
- printf("Case %lld: Impossible\n",++m);
- }
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement