二项分布 期望值np 注意这里是1-p。还有注意p的小数点不超过6位
#include<bits/stdc++.h>
using namespace std;
int gcd(int a,int b)
{
return b==0?a:b=gcd(b,a%b);
}
int main()
{
double p;cin>>p;
if(p>=1) cout<<"Sorrry,JuJu!";
else
{
int e=1e6;
int a=(e-e*p);
cout<<e/gcd(a,e)<<"/"<<a/gcd(a,e);
}
return 0;
}