![](https://img-blog.csdnimg.cn/20201014180756916.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
qdu_week5
yinghui970828
这个作者很懒,什么都没留下…
展开
-
最小公倍数
Description 给定两个正整数,计算这两个数的最小公倍数。 Input 输入包含多组测试数据,每组只有一行,包括两个不大于1000的正整数. Output 对于每个测试用例,给出这两个数的最小公倍数,每个实例输出一行。 Sample Input 10 14 Sample Output 70 #原创 2017-01-24 02:30:50 · 262 阅读 · 0 评论 -
破译密码 POJ - 3749
据说最早的密码来自于罗马的凯撒大帝。消息加密的办法是:对消息原文中的每个字母,分别用该字母之后的第5个字母替换(例如:消息原文中的每个字母A都分别替换成字母F)。而你要获得消息原文,也就是要将这个过程反过来。 密码字母:A B C D E F G H I J K L M N O P Q R S T U V W X Y Z M 原文字母:V W X Y Z A B C D E F G原创 2017-01-29 02:12:03 · 938 阅读 · 1 评论 -
Semi-prime H-numbers POJ - 3292
This problem is based on an exercise of David Hilbert, who pedagogically suggested that one study the theory of 4n+1 numbers. Here, we do only a bit of that. An H-number is a positive number which i原创 2017-01-29 01:26:35 · 259 阅读 · 1 评论 -
Pseudoprime numbers POJ - 3641
Fermat's theorem states that for any prime number p and for any integer a > 1, ap = a (mod p). That is, if we raise a to the pth power and divide by p, the remainder is a. Some (but not very many)原创 2017-01-26 01:15:18 · 260 阅读 · 1 评论 -
Color Me Less POJ - 1046
A color reduction is a mapping from a set of discrete colors to a smaller one. The solution to this problem requires that you perform just such a mapping in a standard twenty-four bit RGB color space原创 2017-01-25 12:48:05 · 276 阅读 · 1 评论 -
Counterfeit Dollar POJ - 1013
首先请允许我骂一顿杀千刀的hoj( g20) ,我找点题目容易么。 然后,欢迎大家逃离大帅的世界,这儿的题目容易得很。 题目来咯: 思远宝宝有一打银币( 一打有几个你知道么)。然而,其中有一个是伪造的(不知道是偏重还是偏轻),现在思远有三次机会进行天平称重,并且保证三次后有解,请你找出伪造银币并告诉我是偏重还是偏轻。 Input 第一行n(n>0)代表有几个原创 2017-01-25 10:51:18 · 293 阅读 · 1 评论 -
Pie HDU - 1969
My birthday is coming up and traditionally I'm serving pie. Not just one pie, no, I have a number N of them, of various tastes and of various sizes. F of my friends are coming to my party and each of原创 2017-01-24 23:26:47 · 249 阅读 · 1 评论 -
整除的尾数 HDU - 2099
一个整数,只知道前几位,不知道末二位,被另一个整数除尽了,那么该数的末二位该是什么呢? Input输入数据有若干组,每组数据包含二个整数a,b(0Output对应每组数据,将满足条件的所有尾数在一行内输出,格式见样本输出。同组数据的输出,其每个尾数之间空一格,行末没有空格。Sample Input 200 40 1992 95 0 0 Sample Output 00 40 80 15原创 2017-01-24 20:22:06 · 168 阅读 · 0 评论 -
Elevator HDU - 1008
The 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 order. It costs 6 sec原创 2017-01-24 19:59:36 · 178 阅读 · 0 评论 -
Least Common Multiple HDU - 1019
The least common multiple (LCM) of a set of positive integers is the smallest positive integer which is divisible by all the numbers in the set. For example, the LCM of 5, 7 and 15 is 105. InputI原创 2017-01-24 17:25:54 · 167 阅读 · 0 评论 -
Least Common Multiple
Least Common Multiple 2016年9月27日 19:16 新浪博客 删除 Description The least common multiple (LCM) of a set of positive integersis the smallest positive integer which is divisible by原创 2017-01-24 02:51:36 · 157 阅读 · 0 评论 -
人见人爱A^B
人见人爱A^B 2016年9月27日 19:00 新浪博客 删除 Description 求A^B的最后三位数表示的整数。 说明:A^B的含义是“A的B次方” Input 输入数据包含多个测试实例,每个实例占一行,由两个正整数A和B组成(1 Output 对于每个测试实例,请输出A^B的最后三位表示的整数,每个输原创 2017-01-24 02:19:29 · 155 阅读 · 0 评论