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