2015
09-17

# Cut the Cake

MMM got a big big big cake, and invited all her M friends to eat the cake together. Surprisingly one of her friends HZ took some (N) strawberries which MMM likes very much to decorate the cake (of course they also eat strawberries, not just for decoration). HZ is in charge of the decoration, and he thinks that it’s not a big deal that he put the strawberries on the cake randomly one by one. After that, MMM would cut the cake into M pieces of sector with equal size and shape (the last one came to the party will have no cake to eat), and choose one piece first. MMM wants to know the probability that she can get all N strawberries, can you help her? As the cake is so big, all strawberries on it could be treat as points.

First line is the integer T, which means there are T cases.
For each case, two integers M, N indicate the number of her friends and the number of strawberry.
(2 < M, N <= 20, T <= 400)

First line is the integer T, which means there are T cases.
For each case, two integers M, N indicate the number of her friends and the number of strawberry.
(2 < M, N <= 20, T <= 400)

2
3 3
3 4

1/3
4/27

http://acm.hdu.edu.cn/showproblem.php?pid=4762

//package fuck;

import java.math.BigInteger;
import java.util.Scanner;

public class Main {
static BigInteger gcd(BigInteger a,BigInteger b){
if(!b.equals(BigInteger.ZERO)) return gcd(b,a.mod(b));
return a;
}
public static void main(String args[]){
Scanner cin=new Scanner(System.in);
int t =  cin.nextInt();
while(t>0){
int m = cin.nextInt();
int n = cin.nextInt();
BigInteger N = BigInteger.valueOf(n);
BigInteger M = BigInteger.valueOf(m).pow(n-1);
BigInteger tmp = gcd(N,M);
System.out.println(N.divide(tmp)+"/"+M.divide(tmp));
t--;
}
}
}

1. 后来我去下载了英文版，把 res_modsxvmmods 里的内容覆盖到原来的配置文件夹的对应路径就OK了，太感动了，毕竟每次改配置文件实在太揪心了（看来这次WG改动了一下swf的机制，XVM的swf文件不得不跟进）

2. 就是啊！那个噬魂，人家已经解释了，你怎么还能骂她呢！反正我看着是你无礼好吗，再说人家又不是那个意思，同意得顶我！！！

3. 丝袜天堂יּ糖果丝袜יּ美女美腿יּ丝袜视频下载יּ玉足无处不在יּwww.meitui1.com