📄 pku2101.cpp
字号:
#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 + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -