![](https://img-blog.csdnimg.cn/20201014180756919.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
杭电
潇潇今天学习了吗
这个作者很懒,什么都没留下…
展开
-
杭电oj-2008
#include<iostream>using namespace std;int main(){ int n; while(scanf("%d",&n)!=EOF) int z=0; int f=0; int x=0; for(int i=0;i<n;i++) { int t; scanf("%d",&t); if(t==0) x++; else if(t<0) z++; else f++; } pri原创 2020-10-14 22:01:48 · 99 阅读 · 0 评论 -
杭电oj-2007
#include<iostream>using namespace std;int main(){ int m,n; while(scanf("%d %d",&m,&n)) { int qs=0; int os=0; if(m>n) { int t=m; m=n; n=t; } for(int i=m;i<=n;i++) { if(i%2==0) { os+=i*i; } els原创 2020-10-14 21:59:03 · 132 阅读 · 0 评论 -
杭电oj-2004
#include<iostream>#include<cmath>using namespace std;int main(){ double a; while(cin>>a) { if(a>100 || a<0) { printf("Score is error!\n"); } else{ int t=(int)(a/10); switch (t) { case 10: printf("A\原创 2020-10-14 12:05:58 · 132 阅读 · 0 评论 -
杭电oj-2003
#include<stdio.h>#include<math.h>int main(){ double a; while(~scanf("%lf",&a)) { a=abs(a); printf("%.2lf\n",a); } return 0;}原创 2020-10-13 16:07:10 · 101 阅读 · 0 评论 -
杭电-2002
#include<stdio.h>#include<math.h>#define PI 3.1415927double tiji(double r){ double t; t=(4.0/3.0)*PI*pow(r,3); return t;}void main(){ double r; while(~scanf("%lf",&r)) { printf("%.3lf\n",tiji(r)); }}原创 2020-10-13 15:59:46 · 103 阅读 · 0 评论 -
杭电-2001
#include<stdio.h>#include<math.h>int main(){ int x0,y0,x1,y1; double s; while(scanf("%d %d %d %d",&x0,&y0,&x1,&y1)!=EOF) { s=sqrt( (x0-x1)*(x0-x1)+(y0-y1)*(y0-y1) ); printf("%.2f",s); } return 0;}原创 2020-10-13 15:39:05 · 147 阅读 · 0 评论 -
杭电-1905
The input will consist of a series of pairs of integers a and b, separated by a space, one pair of integers per line.输入将由一系列整数对a和b组成,用空格隔开,每行一对整数。For each pair of input integers a and b you should output the sum of a and b, and followed by a blank line.原创 2020-09-27 16:30:57 · 241 阅读 · 0 评论 -
杭电-1094
#include<iostream>using namespace std;int main(){ int n,i,sum,a; while(cin>>n) { sum=0; for(i=0;i<n;i++) { scanf("%d",&a); sum+=a; }原创 2020-09-25 14:41:21 · 90 阅读 · 0 评论 -
杭电-1093
#include<iostream>using namespace std;int main(){ int s,n,i,sum; scanf("%d",&s); for(int j=0;j<s;j++) { scanf("%d",&n); sum=0; int *a=new int[n]; for(i=0;i<n;i++原创 2020-09-25 14:35:57 · 134 阅读 · 0 评论 -
杭电oj-1092
Input contains multiple test cases. Each test case contains a integer N, and then N integers follow in the same line. A test case starting with 0 terminates the input and this test case is not to be processed输入包含多个测试用例。每个测试用例都包含一个整数N,然后N个整数跟在同一行中。以0开头的测试用原创 2020-09-25 14:31:27 · 470 阅读 · 0 评论 -
杭电-1901
输入包含多个测试用例。每个测试用例包含一对整数a和b,每行一对整数。包含0 0的测试用例终止输入,并且不处理此测试用例。#include<iostream>using namespace std;int main(){ int a,b; while(cin>>a>>b) { if(a==0 && b==0) break; cout<&l原创 2020-09-18 17:38:27 · 145 阅读 · 0 评论 -
杭电-1090
输入在第一行中包含一个整数N,之后是N行。每行由一对整数a和b组成,用空格隔开,每行一对整数。对于每对输入整数a和b,您应该在一行中输出a和b的和,并且在输入中每行输出一行。#include<iostream>using namespace std;int main(){ int a,b; int n; cin>>n; int i; for(i=0;i<n;i++) { c原创 2020-09-18 17:31:30 · 364 阅读 · 1 评论 -
杭电-1089
#include<iostream>using namespace std;int main(){ int a,b; while(cin>>a>>b) cout<<a+b<<endl; return 0;}原创 2020-09-18 17:11:56 · 135 阅读 · 0 评论 -
杭电-1000
#include<iostream>using namespace std;int main(){ int a,b; while(cin>>a>>b) cout<<a+b<<endl; return 0;}原创 2020-09-18 17:10:08 · 76 阅读 · 0 评论