I solved the problem through simple maths indent preformatted text by 4 spaces
here is my code
/*************What doesn't kills you makes you stronger************************/
include
using namespace std;
define ld long double
define ull unsigned long long
define ll long long
define mod 1000000007
define f(i,n) for( ll (i)= 0;(i)<(n);(i)++)
define faster ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0)
define lp pair
define maxn 100001
define mp make_pair
define mt make_tuple
//ll gcd(ll a ,ll b) {return(a==0?b:gcd(b%a,a))
int main()
{faster;
ll n,q,g=0;
cin>>q;
while(q--)
{cin>>n;
ll ans=0;
for(ll i=2;i<=sqrt(n);i++)
if(n%i==0){
ans=(n-i)/2;
break;
}
g++;
cout<<"Case #"<<g<<": "<<ans<<endl;
}
}