上一页 1 ··· 16 17 18 19 20 21 22 23 24 ··· 27 下一页
摘要: 欧拉函数:对于一个正整数n,小于n且和n互质的正整数(包括1)的个数,记作φ(n) 。通式: 其中p1, p2……pn为x的所有质因数,x是不为0的整数。φ(1)=1(和1互质的数(小于等于1)就是1本身)。注意:每种质因数只一个。 比如12=2*2*3那么φ(12)... 阅读全文
posted @ 2018-08-24 20:46 Mercury_Lc 阅读(437) 评论(0) 推荐(0)
摘要: 一个十进制整数被叫做权势二进制,当他的十进制表示的时候只由0或1组成。例如0,1,101,110011都是权势二进制而2,12,900不是。当给定一个n的时候,计算一下最少要多少个权势二进制相加才能得到n。Input单组测试数据。 第一行给出一个整数n (1#incl... 阅读全文
posted @ 2018-08-24 18:56 Mercury_Lc 阅读(122) 评论(0) 推荐(0)
摘要: 一个十进制整数被叫做权势二进制,当他的十进制表示的时候只由0或1组成。例如0,1,101,110011都是权势二进制而2,12,900不是。当给定一个n的时候,计算一下最少要多少个权势二进制相加才能得到n。Input单组测试数据。 第一行给出一个整数n (1#incl... 阅读全文
posted @ 2018-08-24 18:56 Mercury_Lc 阅读(130) 评论(0) 推荐(0)
摘要: 小K手中有n张牌,每张牌上有一个一位数的数,这个字数不是0就是5。小K从这些牌在抽出任意张(不能抽0张),排成一行这样就组成了一个数。使得这个数尽可能大,而且可以被90整除。注意:1.这个数没有前导0,2.小K不需要使用所有的牌。Input每个测试数据输入共2行。 第... 阅读全文
posted @ 2018-08-24 18:48 Mercury_Lc 阅读(209) 评论(0) 推荐(0)
摘要: 小K手中有n张牌,每张牌上有一个一位数的数,这个字数不是0就是5。小K从这些牌在抽出任意张(不能抽0张),排成一行这样就组成了一个数。使得这个数尽可能大,而且可以被90整除。注意:1.这个数没有前导0,2.小K不需要使用所有的牌。Input每个测试数据输入共2行。 第... 阅读全文
posted @ 2018-08-24 18:48 Mercury_Lc 阅读(129) 评论(0) 推荐(0)
摘要: Problem Description"You shall not pass!"After shouted out that,the Force Staff appered in CaoHaha's hand.As we all know,the Force Staf... 阅读全文
posted @ 2018-08-24 10:04 Mercury_Lc 阅读(86) 评论(0) 推荐(0)
摘要: Problem Description"You shall not pass!"After shouted out that,the Force Staff appered in CaoHaha's hand.As we all know,the Force Staf... 阅读全文
posted @ 2018-08-24 10:04 Mercury_Lc 阅读(123) 评论(0) 推荐(0)
摘要: Problem DescriptionIt is well known that small groups are not conducive of the development of a team. Therefore, there shouldn’t be an... 阅读全文
posted @ 2018-08-24 08:48 Mercury_Lc 阅读(76) 评论(0) 推荐(0)
摘要: Problem DescriptionIt is well known that small groups are not conducive of the development of a team. Therefore, there shouldn’t be an... 阅读全文
posted @ 2018-08-24 08:48 Mercury_Lc 阅读(83) 评论(0) 推荐(0)
摘要: Problem Description 已知一棵二叉树的前序遍历和中序遍历,求二叉树的后序遍历和层序遍历。Input 输入数据有多组,第一行是一个整数t (t#include #include struct node{ char data; // 储存字符 ... 阅读全文
posted @ 2018-08-17 21:02 Mercury_Lc 阅读(108) 评论(0) 推荐(0)
上一页 1 ··· 16 17 18 19 20 21 22 23 24 ··· 27 下一页