#include<cstdio>
#include<iostream>
using namespace std;
typedef unsigned long long ULL;
int t,n,k,cas=0;
ULL gcd(ULL a,ULL b)
{
return b==0?a:gcd(b,a%b);
}
int main()
{
scanf("%d",&t);
while(t--)
{
ULL ans=1,tmp=1;
scanf("%d%d",&n,&k);
for(int i=1;i<=k;i++)
tmp*=2;
ans=tmp-k-1;
if(ans<0) ans=0;
ULL t=gcd(ans,tmp);
ans/=t;
tmp/=t;
// cout<<ans<<" "<<tmp<<endl;
printf("Case #%d: %llu/%llu\n",++cas,ans,tmp);
}
return 0;
}
UVA 11971(p335)----Polygon
最新推荐文章于 2023-12-27 21:28:26 发布