Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<bits/stdc++.h>
- using namespace std;
- #define fast()(ios_base::sync_with_stdio(false),cin.tie(NULL));
- typedef long long ll;
- int main()
- {
- ll t,w;
- cin>>t;
- for(int i=1; i<=t; i++)
- {
- cin>>w;
- ll even,odd;
- odd=w/2;
- even=2;
- if(w%2!=0)
- cout<<"Case "<<i<<": Impossible"<<endl;
- else
- {
- while(odd%2==0)
- {
- odd/=2;
- even*=2;
- }
- cout<<"Case "<<i<<": "<<odd<< " "<<even<<endl;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement