pku2101.cpp
来自「这是ACM 方面的资料 是PKU的 北京大学的出来的」· C++ 代码 · 共 17 行
CPP
17 行
#include "stdio.h"
#include "math.h"
int main()
{
long n,e,l1,l2,i,all,tint;
double tmp;
long temp;
scanf("%ld%ld",&n,&e);
for(i=1,l1=0;i<n;i++){ scanf("%ld",&temp);l1+=temp;}
for(i=1,l2=0;i<e;i++){ scanf("%ld",&temp);l2+=temp;}
all=l1*l1+l2*l2;
tint=sqrt(all);
if(all==tint*tint) printf("%ld\n",tint);
else printf("%ld\n",tint+1);
return 0;
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?