自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

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

原创 Raising Modulo Numbers

People are different. Some secretly read magazines full of interesting girls' pictures, others create an A-bomb in their cellar, others like using Windows, and some like difficult mathematical games.

2017-01-30 19:47:19 466

原创 Pseudoprime numbers

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) no

2017-01-30 19:45:13 221

原创 key set

soda has a set SS with nn integers {1,2,…,n}{1,2,…,n}. A set is called key set if the sum of integers in the set is an even number. He wants to know how many nonempty subsets of SS are key set.

2017-01-30 19:43:02 343

原创 the sum of cube 立方和

A range is given, the begin and the end are both integers. You should sum the cube of all the integers in the range. InputThe first line of the input is T(1 Each case of input is a pair of intege

2017-01-30 19:41:52 294

原创 不要62

杭州人称那些傻乎乎粘嗒嗒的人为62(音:laoer)。  杭州交通管理局经常会扩充一些的士车牌照,新近出来一个好消息,以后上牌照,不再含有不吉利的数字了,这样一来,就可以消除个别的士司机和乘客的心理障碍,更安全地服务大众。  不吉利的数字为所有含有4或62的号码。例如:  62315 73418 88914  都属于不吉利号码。但是,61152虽然含有6和2,但不是62连号,所以不属于不吉

2017-01-30 19:40:44 335

原创 美素数

小明对数的研究比较热爱,一谈到数,脑子里就涌现出好多数的问题,今天,小明想考考你对素数的认识。    问题是这样的:一个十进制数,如果是素数,而且它的各位数字和也是素数,则称之为“美素数”,如29,本身是素数,而且2+9 = 11也是素数,所以它是美素数。    给定一个区间,你能计算出这个区间内有多少个美素数吗? Input第一行输入一个正整数T,表示总共有T组数据(T 接下来共T

2017-01-30 19:38:02 220

原创 分拆素数和

把一个偶数拆成两个不同素数的和,有几种拆法呢? Input输入包含一些正的偶数,其值不会超过10000,个数不会超过500,若遇0,则结束。 Output对应每个偶数,输出其拆成不同素数的个数,每个结果占一行。 Sample Input 30 26 0 Sample Output 3 2 思路 两个不相等的素数之和等于这个数即可 直接打表 #include i

2017-01-30 19:34:49 244

原创 素数判定

对于表达式n^2+n+41,当n在(x,y)范围内取整数值时(包括x,y)(-39 Input输入数据有多组,每组占一行,由两个整数x,y组成,当x=0,y=0时,表示输入结束,该行不做处理。 Output对于每个给定范围内的取值,如果表达式的值都为素数,则输出"OK",否则请输出“Sorry”,每组输出占一行。  Sample Input 0 1 0 0 Sample Ou

2017-01-30 19:32:50 173

原创 又见GCD

有三个正整数a,b,c(0 Input第一行输入一个n,表示有n组测试数据,接下来的n行,每行输入两个正整数a,b。  Output输出对应的c,每组测试数据占一行。  Sample Input 2 6 2 12 4 Sample Output 4 8 思路 a c 分别除以他们的最大公约数 得到的两个结果是互质的 枚举一下即可 #include in

2017-01-29 19:10:20 455

原创 wolf and rabbit

There is a hill with n holes around. The holes are signed from 0 to n-1.  A rabbit must hide in one of the holes. A wolf searches the rabbit in anticlockwise order. The first hole he get into

2017-01-29 19:04:45 247

原创 cake

There is a hill with n holes around. The holes are signed from 0 to n-1.  A rabbit must hide in one of the holes. A wolf searches the rabbit in anticlockwise order. The first hole he get into

2017-01-28 10:36:07 178

空空如也

空空如也

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

TA关注的人

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