Advertisement
jakaria_hossain

lightoj - 1116 - ekka dokka

Aug 21st, 2019
145
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.56 KB | None | 0 0
  1. #include<bits/stdc++.h>
  2. using namespace std;
  3. #define fast()(ios_base::sync_with_stdio(false),cin.tie(NULL));
  4. typedef long long ll;
  5. int main()
  6. {
  7. ll t,w;
  8. cin>>t;
  9. for(int i=1; i<=t; i++)
  10. {
  11. cin>>w;
  12. ll even,odd;
  13. odd=w/2;
  14. even=2;
  15. if(w%2!=0)
  16. cout<<"Case "<<i<<": Impossible"<<endl;
  17. else
  18. {
  19. while(odd%2==0)
  20. {
  21. odd/=2;
  22. even*=2;
  23. }
  24. cout<<"Case "<<i<<": "<<odd<< " "<<even<<endl;
  25. }
  26.  
  27. }
  28. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement