?? 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 + -