摘要: 求A^B的最后三位数表示的整数。 说明:A^B的含义是“A的B次方” Input输入数据包含多个测试实例,每个实例占一行,由两个正整数A和B组成(1<=A,B<=10000),如果A=0, B=0,则表示输入数据的结束,不做处理。Output对于每个测试实例,请输出A^B的最后三位表示的整数,每个输 阅读全文
posted @ 2017-08-14 11:33 听说这是最长的名字了 阅读(407) 评论(0) 推荐(0) 编辑
摘要: To improve the organization of his farm, Farmer John labels each of his N (1 <= N <= 5,000) cows with a distinct serial number in the range 1..20,000. 阅读全文
posted @ 2017-08-14 11:32 听说这是最长的名字了 阅读(426) 评论(0) 推荐(0) 编辑
摘要: Write a program to read in a list of integers and determine whether or not each number is prime. A number, n, is prime if its only divisors are 1 and 阅读全文
posted @ 2017-08-14 11:31 听说这是最长的名字了 阅读(275) 评论(0) 推荐(0) 编辑
摘要: 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 e 阅读全文
posted @ 2017-08-14 11:28 听说这是最长的名字了 阅读(256) 评论(0) 推荐(0) 编辑
摘要: 给定两个正整数,计算这两个数的最小公倍数。 Input 输入包含多组测试数据,每组只有一行,包括两个不大于1000的正整数.Output对于每个测试用例,给出这两个数的最小公倍数,每个实例输出一行。 Sample Input Sample Output 阅读全文
posted @ 2017-08-14 11:26 听说这是最长的名字了 阅读(358) 评论(0) 推荐(0) 编辑