这题会爆int 导致RE。
#include <iostream>
#include <algorithm>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <vector>
#include <cmath>
using namespace std;
const int INF = ~0U >> 1;
const double eps = 1e-8;
const double pi = acos(-1.0);
typedef long long ll;
ll gcd(ll a, ll b)
{
return b == 0L ? a : gcd(b, a % b);
}
int main()
{
ll T, n, k, kase = 0;
scanf("%lld", &T);
while(T--) {
scanf("%lld%lld", &n, &k);
ll x = (ll)pow(2, k);
ll c = x - k - 1;
ll v = gcd(c, x);
printf("Case #%lld: %lld/%lld\n", ++kase, c/v, x/v);
}
return 0;
}