Run ID | Author | Problem | Lang | Verdict | Time | Memory | Code Length | Submit Time |
---|---|---|---|---|---|---|---|---|
411 | huangshengxuan | 地球人口承载力估计 | C++ | Accepted | 0 MS | 252 KB | 224 | 2022-11-11 20:27:40 |
#include<iostream> #include<iomanip> using namespace std; int main() { int x,y,a,b; double z; cin>>x>>a>>y>>b; z=(y*b-x*a)/(b-a); cout<<setiosflags(ios::fixed)<<setprecision(2); cout<<z<<endl; return 0; }