| ||||||||||
| 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:水题~(第一次贴代码)In Reply To:水题~(第一次贴代码) Posted by:dizem at 2009-07-31 00:42:04 > #include "stdio.h"
> #include "math.h"
> int main()
> {
> int n, e;
> double l1,l2,a;
> scanf("%d%d",&n, &e);
> l1 = l2 = 0;
> n--, e--;
> while(n--) scanf("%lf",&a), l1 += a;
> while(e--) scanf("%lf",&a), l2 += a;
> l1 = sqrt(l1*l1+l2*l2);
> printf("%.0lf\n", ceil(l1));
> }
这样不好吧!
Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator