自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(20)
  • 收藏
  • 关注

原创 今年暑假不AC

ProblemDescription“今年暑假不AC?”“是的。”“那你干什么呢?”“看世界杯呀,笨蛋!”“@#$%^&*%…”确实如此,世界杯来了,球迷的节日也来了,估计很多ACMer也会抛开电脑,奔向电视了。作为球迷,一定想看尽量多的完整的比赛,当然,作为新时代的好青年,你一定还会看一些其它的节目,比如新闻联播(永远不要忘记关心国家大事)、非常6+7、超级女生,以及王小丫...

2020-03-23 17:10:11 118

原创 吃糖果

ProblemDescriptionHOHO,终于从Speakless手上赢走了所有的糖果,是Gardon吃糖果时有个特殊的癖好,就是不喜欢将一样的糖果放在一起吃,喜欢先吃一种,下一次吃另一种,这样;可是Gardon不知道是否存在一种吃糖果的顺序使得他能把所有糖果都吃完?请你写个程序帮忙计算一下。Input第一行有一个整数T,接下来T组数据,每组数据占2行,第一行是一个整数N(0<N&...

2020-03-23 10:59:30 115

原创 Number Sequence

ProblemDescriptionA number sequence is defined as follows:f(1) = 1, f(2) = 1, f(n) = (A * f(n - 1) + B * f(n - 2)) mod 7.Given A, B, and n, you are to calculate the value of f(n).InputThe input c...

2020-03-22 11:56:31 120

原创 Fibonacci Again

ProblemDescriptionThere are another kind of Fibonacci numbers: F(0) = 7, F(1) = 11, F(n) = F(n-1) + F(n-2) (n>=2).InputInput consists of a sequence of lines, each containing an integer n. (n &lt...

2020-03-21 17:54:03 119

原创 人见人爱A^B

ProblemDescription求A^B的最后三位数表示的整数。说明:A^B的含义是“A的B次方”Input输入数据包含多个测试实例,每个实例占一行,由两个正整数A和B组成(1<=A,B<=10000),如果A=0, B=0,则表示输入数据的结束,不做处理。Output对于每个测试实例,请输出A^B的最后三位表示的整数,每个输出占一行。Sample Input2 3...

2020-03-20 18:09:39 121

原创 Rightmost Digit

ProblemDescriptionGiven a positive integer N, you should output the most right digit of N^N.InputThe input contains several test cases. The first line of the input is a single integer T which is th...

2020-03-19 12:48:27 170

原创 最小公倍数

Problem描述给定两个正整数,计算这两个数的最小公倍数。Input输入包含多组测试数据,每组只有一行,包括两个不大于1000的正整数.Output对于每个测试用例,给出这两个数的最小公倍数,每个实例输出一行。Sample Input10 14Sample Output70代码#include<stdio.h>int main(){ int n,m,n1...

2020-03-18 13:09:18 107

原创 Elevator

ProblemDescriptionThe highest building in our city has only one elevator. A request list is made up with N positive numbers. The numbers denote at which floors the elevator will stop, in specified or...

2020-03-17 12:41:15 72

原创 Sum Problem

ProblemDescription Hey, 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 in...

2020-03-16 13:52:07 90

原创 Uniform Generator

ProblemDescriptionComputer simulations often require random numbers. One way to generate pseudo-random numbers is via a function of the formseed(x+1) = [seed(x) + STEP] % MODwhere ‘%’ is the modulu...

2020-03-15 17:06:45 143

原创 Digital Roots

ProblemDescriptionThe digital root of a positive integer is found by summing the digits of the integer. If the resulting value is a single digit then that digit is the digital root. If the resulting ...

2020-03-13 15:50:14 105

原创 Big Number

ProblemDescriptionIn many applications very large integers numbers are required. Some of these applications are using keys for secure transmission of data, encryption, etc. In this problem you are gi...

2020-03-13 15:07:00 75

原创 The Hardest Problem Ever

ProblemDescriptionJulius Caesar lived in a time of danger and intrigue. The hardest situation Caesar ever faced was keeping himself alive. In order for him to survive, he decided to create one of the...

2020-03-12 17:01:36 110

原创 A+B for Input-Output Practice (VII)

ProblemDescriptionYour task is to Calculate a + b.InputThe input will consist of a series of pairs of integers a and b, separated by a space, one pair of integers per line.OutputFor each pair of ...

2020-03-12 16:22:29 116

原创 A+B for Input-Output Practice (VI)

ProblemDescription Your task is to calculate the sum of some integers.InputInput contains multiple test cases, and one case one line. Each case starts with an integer N, and then N integers follow ...

2020-03-11 10:19:11 168

原创 A+B for Input-Output Practice (V)

ProblemDescription Your task is to calculate the sum of some integers.InputInput contains an integer N in the first line, and then N lines follow. Each line starts with a integer M, and then M inte...

2020-03-11 10:12:50 113

原创 A+B for Input-Output Practice (IV)

ProblemDescriptionYour task is to Calculate the sum of some integers.InputInputcontains multiple test cases. Each test case contains a integer N, and then N integers follow in the same line. A test...

2020-03-10 13:18:22 228

原创 A+B for Input-Output Practice (III)

Problem DescriptionYour task is to Calculate a + b.InputInputcontains multiple test cases. Each test case contains a pair of integers a and b, one pair of integers per line. A test case containing ...

2020-03-10 13:15:26 280

原创 A+B for Input-Output Practice (II)

Problem DescriptionYour task is to Calculate a + b.InputInput contains an integer N in the first line, and then N lines follow. Each line consists of a pair of integers a and b, separated by a spac...

2020-03-09 20:08:21 230

原创 A+B for Input-Output Practice (I)

A+B for Input-Output Practice (I)Time Limit : 2000/1000ms (Java/Other) Memory Limit : 65536/32768K (Java/Other)Total Submission(s) : 36 Accepted Submission(s) : 15Problem DescriptionYour task ...

2020-03-09 20:06:20 142

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除