题目描述 概率问题 #include<iostream> #include<cmath> using namespace std; int main(){ int s; cin>>s; int n; double p; int i; while(s--){ cin>>n>>p>>i; double pro=(p*pow(1-p,i-1))/(1-pow(1-p,n)); printf("%.4lf\n",pro); } }