| ||||||||||
| Online Judge | Problem Set | Authors | Online Contests | User | ||||||
|---|---|---|---|---|---|---|---|---|---|---|
| Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest | |||||||||
AC代码,作为参考,其实挺水的#include <stdio.h>
#include <math.h>
double ka;
double acid;
double res;
double temp, delta;
int m, n;
int main()
{
scanf("%lf%lf%d%d", &ka, &acid, &m, &n);
while(ka && acid && m && n)
{
delta = sqrt(ka * ka+4 * n * acid * ka * m);
temp = (-ka + delta) / (2 * n);
res = -log10(temp);
printf("%.3lf\n",res);
scanf("%lf%lf%d%d", &ka, &acid, &m, &n);
}
return 0;
}
Followed by:
Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator