I am working on this problem LMA1
I tried this method from the editorial. Why am I getting WA ?
#include<bits/stdc++.h>
using namespace std;
int main(){
ios::sync_with_stdio(0);
double t,a,n,p,d,q;
cin>>t;
while(t--){
cin>>a>>p>>q>>d;
cout<<setprecision(d)<<(p*a*(1-a)+(q*a))/((1-a)*(1-a))<<endl;
}
return 0;
}