A reversible prime in any number system is a prime whose "reverse" in that number system is also a prime. For example in the decimal system 73 is a re ...
分类:
其他好文 时间:
2018-09-03 17:20:31
阅读次数:
170
prime[]数组中的素数是递增的,当i能整除prime[j],那么i*prime[j+1]这个合数肯定被prime[j]乘以某个数筛掉。 因为i中含有prime[j],prime[j]比prime[j+1]小,即i=k*prime[j],那么i*prime[j+1]=(k*prime[j])*pr... ...
分类:
其他好文 时间:
2018-09-02 23:50:03
阅读次数:
150
J. Sum A square-free integer is an integer which is indivisible by any square number except 111. For example, 6=2?36 = 2 \cdot 36=2?3 is square-free, ...
分类:
其他好文 时间:
2018-09-02 14:36:09
阅读次数:
302
ubuntu系统英伟达显卡驱动怎么装 这样装完之后,可能还会遇到开机后无法登录,一直在登录界面循环的问题,解决办法是: ubuntu下安装搜狗拼音的最便捷方法 先下载安装包,deb格式的,然后执行 之后会提示你缺少依赖,这个时候再执行: 然后进入系统设置 语言支持,把键盘输入方法由ibus改为fci ...
分类:
系统相关 时间:
2018-09-02 11:08:54
阅读次数:
298
题目传送门 Semi-prime H-numbers Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 10871 Accepted: 4881 Description This problem is based on an exe ...
分类:
其他好文 时间:
2018-09-02 11:05:08
阅读次数:
184
题目: 给定整数N,求1<=x,y<=N且Gcd(x,y)为素数的数对(x,y)有多少对. 输入: 一个整数N。 输出: 如题。 Sample Input 4 Sample Output 4 Hint 对于样例(2,2),(2,4),(3,3),(4,2) 1<=N<=10^7 思路: 对于本题,因 ...
分类:
其他好文 时间:
2018-08-31 21:28:16
阅读次数:
203
Prime Path Time Limit: 5000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 987 Accepted Submission(s): 635 Proble ...
分类:
其他好文 时间:
2018-08-31 21:04:43
阅读次数:
205
For two rational numbers, your task is to implement the basic arithmetics, that is, to calculate their sum, difference, product and quotient. Input Sp ...
分类:
其他好文 时间:
2018-08-31 17:09:12
阅读次数:
191
Given N rational numbers in the form numerator/denominator, you are supposed to calculate their sum. Input Specification: Each input file contains one ...
分类:
其他好文 时间:
2018-08-31 10:49:51
阅读次数:
232
<题目链接> 题目大意: 给你两个四位数,它们均为素数,以第一个四位数作为起点,每次能够变换该四位数的任意一位,变换后的四位数也必须是素数,问你是否能够通过变换使得第一个四位数变成第二个四位数。 解题分析: 先打一张素数表,然后进行BFS搜索,对于每次搜索的当前数,枚举某一位与它不同的所有数,判断它 ...
分类:
其他好文 时间:
2018-08-31 00:27:55
阅读次数:
170