
素数
踢到火星
我是我生命的主宰
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
Trailing Zeroes (I)
We know what a base of a number is and what the properties are. For example, we use decimal number system, where the base is 10 and we use the symbols - {0, 1, 2, 3, 4, 5, 6, 7, 8, 9}. But in differen...原创 2018-07-24 15:35:57 · 308 阅读 · 0 评论 -
Problem A
度熊手上有一本字典存储了大量的单词,有一次,他把所有单词组成了一个很长很长的字符串。现在麻烦来了,他忘记了原来的字符串都是什么,神奇的是他竟然记得原来那些字符串的哈希值。一个字符串的哈希值,由以下公式计算得到: H(s)=∏i≤len(s)i=1(Si−28) (mod 9973)H(s)=∏i=1i≤len(s)(Si−28) (mod 9973) SiSi代表 S[i] 字符的 ASCII...原创 2018-07-24 16:00:35 · 171 阅读 · 0 评论 -
Largest prime factor
Everybody knows any number can be combined by the prime number. Now, your task is telling me what position of the largest prime factor. The position of prime 2 is 1, prime 3 is 2, and prime 5 is 3, ...原创 2018-07-29 13:11:20 · 361 阅读 · 0 评论