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). ...
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 <<......
标签: java
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...
OJ2020 import java.util.Scanner; public class Main2020{ public static void main(String[] args) { Scanner in = new Scanner(System.in); while(in.hasNext()) { int n = in.ne...
第一次提交的是直接cout;所以需要添加一个循环来不断获取每行得到的数据。对于每种情况,在一行中输出。后面仔细阅读题目发现是。
#include &lt;iostream&gt; #include &lt;vector&gt; using namespace std; typedef struct { int J; int F; double pro; }MES; int main() { int M, N;... if (M == -1)...
汉字统计Problem Description统计给定文本文件中汉字的个数。Input输入文件首先包含一个整数n,表示测试实例的个数,然后是n段文本。Output对于每一段文本,输出其中的汉字的个数,每个测试实例的输出占一行。...
【代码】航电oj 2005 C语言。
杭电oj2000
杭电OJ2004——成绩转换/*成绩转换Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 140424 Accepted Submission(s): 61308Problem Description输入一个百分...
杭电2093题,Java版虽然不难但很麻烦。import java.util.ArrayList;import java.util.Collections;import java.util.List;import java.util.Scanner;/*** @Author Yun* @Date 2020/9/9 8:56** Accepted!!!!!*/class ...
#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 ...
母牛的故事Time Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 60806Accepted Submission(s): 30155Problem Description有一头母牛,它每年年初生一头小母牛。...
杭电OJ水题答案Hdu1000,1090#includeint main(){int a,b;while (scanf("%d %d",&a,&b)==2)printf("%d\n",a+b);return 0;}Hdu1008#includeint main(){int n,i,j;int t;while(scanf("%d",&n)!=EOF){t=5*n;...
scanf有返回值当成功输入几个数返回值就是输入数量,没有如何输入就是停止输入返回EOF ,当循环读入可以手动ctrl+Z停止输入。 1000 A + B Problem 1089 A+B for Input-Output Practice (I)一样 ...
Problem Description求A^B的最后三位数表示的整数。说明:A^B的含义是“A的B次方”Input输入数据包含多个测试实例,每个实例占一行,由两个正整数A和B组成(1<=A,B<=10000),如果A=0, B=0,则表示输入数据的...
标签: 杭电OJ
#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,...
杭电OJ水题答案2Hdu 2000#includevoid main(){char a,b,c,t;while(scanf("%c%c%c",&a,&b,&c)>0){if(a>b) t=a,a=b,b=t;if(a>c) t=c,c=a,a=t;if(c>a && cscanf("%*c",&a);printf...
#include&lt;stdio.h&gt;int main(){ int a,b,n; scanf("%d",&amp;n); while(n--){ scanf("%d%d",&amp;a,&amp;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,&...
杭电oj分类
作为杭电的老师,最盼望的日子就是每月的8号了,因为这一天是发工资的日子,养家糊口就靠它了,呵呵 但是对于学校财务处的工作人员来说,这一天则是很忙碌的一天,财务处的小胡老师最近就在考虑一个问题:如果每个...
Sum ProblemTime Limit: 1000/500 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 609664 Accepted Submission(s): 154237Problem DescriptionHey, welcome to HDOJ(Hangzh...
标签: java
#杭电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 ...