”杭电OJ“ 的搜索结果

      1. Ignatius will never drink the milk which is produced 6 days ago or earlier. That means if the milk is produced 2005-1-1, Ignatius will never drink this bottle after 2005-1-6(inclusive). ...

     #include using namespace std; int main() { int n, sum, i; while (cin >> n) { sum = 0; for (i = 1; i <= n; i++) { sum = sum + i; } cout << sum << endl <<......

     2030汉字统计java Problem Description 统计给定文本文件中汉字的个数。 Input 输入文件首先包含一个整数n,表示测试实例的个数,然后是n段文本。 Output 对于每一段文本,输出其中的汉字的个数,每个测试实例的输出...

     #include <iostream> using namespace std; int main() { int n,m; while(cin>>n>>m) { int s(2),sum(0),j(0); for(int i=1;i<=n;++i) { ++j; sum=sum+2*i;... { cout...

     本题开始时很懵逼,因为我不知道m是代表什么,但后面经过结果与输入的观察发现m就是肥鼠所拥有的猫粮,由于每个仓库的JavaBean的数量和兑换率不同,所以这个题我想到用结构体进行求解。 #include <...

     第一次提交的是直接cout;所以需要添加一个循环来不断获取每行得到的数据。对于每种情况,在一行中输出。后面仔细阅读题目发现是。

     杭电OJ——ACM 1003.Max Sum链接入口 问题描述 大意:给定一个序列a[1],a[2],a[3]…a[n],你需要算出其子序列中的最大值。比如说:给你一个序列(6,-1,5,4,-7),它的子序列之和中的最大值是6 + (-1) + 5 + 4 = 14...

     #include <iostream> #include <vector> using namespace std; typedef struct { int J; int F; double pro; }MES; int main() { int M, N;... if (M == -1)...

     #include <stdio.h> #include <math.h> //素数英文:prime number int deal(int a) { int i; if(a==2||a==3) return 1; for(i=2;i<=(int)sqrt(a*1.0);i++) if(a%i==0) return 0;...int ma...

     Problem DescriptionHey, welcome to HDOJ(Hangzhou Dianzi University Online Judge).In this problem, your task is to calculate SUM(n) = 1 + 2 + 3 + ... + n. InputThe input will consist of a series of ...

     #include <iostream> #include <string> #include <cstring> using namespace std; const int MAXN = 10000...const int mod[20] = { 1, 1, 2, 6, 4, 2, 2, 4, 2, 8, 4, 4, 8, 4, 6, 8, 8, 6, 8,...

     #include<stdio.h>int main(){ int a,b,n; scanf("%d",&n); while(n--){ scanf("%d%d",&a,&b); printf("%d\n",a+b);...}

     题目:http://acm.hdu.edu.cn/showproblem.php?pid=2074` #include <stdio.h> #include <string.h> int main() { int n,flag,count=0; char a[6],b,pic[90][90]; while(~scanf("%d %c %c...n,&amp...

     作为杭电的老师,最盼望的日子就是每月的8号了,因为这一天是发工资的日子,养家糊口就靠它了,呵呵 但是对于学校财务处的工作人员来说,这一天则是很忙碌的一天,财务处的小胡老师最近就在考虑一个问题:如果每个...

     #杭电oj 2022 java 海选女主角 给你n个整数,求他们中所有奇数的乘积。 面试那天,刚好来了mn个MM,站成一个mn的队列, 副导演Fe(OH)2为每个MM打了分数,分数都是32位有符号整数。 一开始我很纳闷:分数怎么还有负...

     FatMouse' Trade Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 76080 Accepted Submission(s): 26061 Problem Description ...

10  
9  
8  
7  
6  
5  
4  
3  
2  
1