#include<iostream>
#include<cstdio>
#include<cstdlib>
using namespace std;
int main()
{
long int k,i,div[2],j,c,n,l;
//freopen("in.txt","r",stdin);
cin>>n;
for(c=1;c<=n;c++)
{
j=0;
cin>>k;
l=k/2+1;
for(i=2;i<l;i++)
{
if(k%i==0)
div[j++]=i;
if(j==2)break;
}
cout<<"Case #"<<c<<": "<<k<<" = "<<div[0]<<" * "<<(k/div[0])<<" = "<<div[1]<<" * "<<(k/div[1])<<endl;
}
exit(0);
}
No comments:
Post a Comment
Note: Only a member of this blog may post a comment.