题解:
求最小的偶数,并且保证我们的m是奇数,我们唯一分解可以知道,当我们2这个因子全部提出来过后,组成n这个数的因子就只有奇质数的因子了。
#pragma GCC optimize("-Ofast","-funroll-all-loops")
#include<bits/stdc++.h>
//#define int long long
using namespace std;
typedef long long ll;
const int N=1e5+10;
int pri[N],tot,vis[N];
signed main()
{
int t; scanf("%d",&t);
int cas=1;
while(t--){
ll n; scanf("%lld",&n);
printf("Case %d: ",cas++);
if(n&1) puts("Impossible");
else{
ll a=1,b=1;
while(n%2==0) b*=2,n/=2;
printf("%lld %lld\n",n,b);
}
}
}