| ||||||||||
| 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 | |||||||||
水题~(第一次贴代码)#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