标签:its typedef std pre clu type class amp bit
这题似乎就是纯概率论。。
E(V)=D(X_i)=npq (p=1/m,p+q=1)
#include<bits/stdc++.h> using namespace std; typedef long long LL; LL n,m; LL gcd(LL a,LL b) { return b?gcd(b,a%b):a; } int main() { while(cin>>n>>m && n+m) { LL a=n*m-n,b=m*m; LL g=gcd(a,b); cout<<a/g<<‘/‘<<b/g<<endl; } }
标签:its typedef std pre clu type class amp bit
原文地址:http://www.cnblogs.com/Just--Do--It/p/6405806.html