最新 最热

HDOJ 2016 数据的交换输出

Problem Description 输入n(n<100)个数,找出其中最小的数,将它与最前面的数交换后输出这些数。

2021-01-20
0

HDOJ 2015 偶数求和

Problem Description 有一个长度为n(n<=100)的数列,该数列定义为从2开始的递增有序偶数,现在要求你按照顺序每m个数求出一个平均值,如果最后不足m个,则以实际数量求平均值。编程输出该平均值序列。...

2021-01-20
0

POJ 1844 Sum

Consider the natural numbers from 1 to N. By associating to each number a sign (+ or -) and calculating the value of this expression we obtain a sum S. The prob...

2021-01-20
1

HDOJ 2012 素数判定

Problem Description 对于表达式n^2+n+41,当n在(x,y)范围内取整数值时(包括x,y)(-39<=x < y<=50),判定该表达式的值是否都为素数。

2021-01-20
0

HDOJ 1995 汉诺塔V

Problem Description 用1,2,…,n表示n个盘子,称为1号盘,2号盘,…。号数大盘子就大。经典的汉诺塔问 题经常作为一个递归的经典例题存在。可能有人并不知道汉诺塔问题的典故。汉诺塔来源于 印度传说的一个故事,上帝创...

2021-01-20
0

HDOJ 1716 排列2 next_permutation函数

Problem Description Ray又对数字的列产生了兴趣: 现有四张卡片,用这四张卡片能排列出很多不同的4位数,要求按从小到大的顺序输出这些4位数。

2021-01-20
0

POJ 2533 Longest Ordered Subsequence

A numeric sequence of ai is ordered if a1 < a2 < … < aN. Let the subsequence of the given numeric sequence (a1, a2, …, aN) be any sequence (ai1, ai2, …, aiK), w...

2021-01-19
1

POJ 2487 Stamps

DescriptionBackground Everybody hates Raymond. He’s the largest stamp collector on planet earth and because of that he always makes fun of all the others at ...

2021-01-19
1

POJ 1503 Integer Inquiry 简单大数相加

One of the first users of BIT’s new supercomputer was Chip Diller. He extended his exploration of powers of 3 to go from 0 to 333 and he explored taking various...

2021-01-19
1

POJ 2390 Bank Interest

Problem Description Farmer John made a profit last year! He would like to invest it well but wonders how much money he will make. He knows the interest rate R...

2021-01-19
1