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 |
Re:AC代码,作为参考,其实挺水的In Reply To:AC代码,作为参考,其实挺水的 Posted by:994487586 at 2011-07-21 01:02:39 > #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