题目描述: 题意: 定义原根:对于一个整数x,0<x<p,是一个mod p下的原根,当且仅当集合{ (xi mod p) | 1 <= i <= p-1 } 等于{ 1, ..., p-1 }.给定p,询问有多少个满足定义的原根。 这里有一个定理:如果p有原根,则它恰有φ(φ(p))个不同的原根 证
分类:
其他好文 时间:
2016-02-05 19:13:36
阅读次数:
215
http://poj.org/problem?id=1284 题意:给定一个奇素数p,求p的原根个数。 原根: { (xi mod p) | 1 <= i <= p-1 } is equal to { 1, ..., p-1 },则x是p的原根。 题解:结论:奇素数p的原根个数为phi(p-1)。
分类:
其他好文 时间:
2016-02-05 01:46:12
阅读次数:
203
Problem Description: The digital root of a positive integer is found by summing the digits of the integer. If the resulting value is a single digit th
分类:
其他好文 时间:
2016-02-02 17:36:24
阅读次数:
133
saltstackmaster端配置文件cat/etc/salt/master|egrep-v‘^$|^#‘
worker_threads:60
cachedir:/data1/var/cache/salt/master##存储缓存信息,特别是salt工作执行的命令
timeout:30
open_mode:True
auto_accept:True
autosign_timeout:0
modules:
-cmd
runner_dirs:[]
file_roots..
分类:
其他好文 时间:
2015-10-28 01:50:23
阅读次数:
993
树控件对应的类: CTreeControl树控件属性设置: 启用复选框:Check Boxes = True 父节点显示+-按钮:Has Button = True ; Lines At Roots = True(若不想根节点显示+-按钮可以不设置) 显示项的层次结构线...
分类:
编程语言 时间:
2015-10-27 22:05:14
阅读次数:
156
题意:求数根。解法:一个数的数根就是mod9的值,0换成9,只是没想到给的是一个大数……只好先把每位都加起来再mod9……代码:#include#include#include#include#include#include#include#include#include#include#inclu...
分类:
其他好文 时间:
2015-09-30 14:37:07
阅读次数:
119
考虑互质的两个数a 2 #include 3 using namespace std; 4 int n; 5 int prime[100], k; 6 7 void solve(){ 8 int m = n - 1; 9 k = 0;10 if(m % 2 == 0){...
分类:
其他好文 时间:
2015-09-13 21:27:09
阅读次数:
133
题目链接 找循环位数是奇数的数有多少个 这个自己很难写出来,完全不能暴力 维基百科链接 维基百科上面说的很好,上面的算法实现就好了。 就是上面的 Java程序: package project61; public class P64{ void run(){ int count = 0; int m...
分类:
其他好文 时间:
2015-09-05 16:25:28
阅读次数:
158
JVM堆中几乎放着Java世界中所有的对象实例,垃圾收集器在对堆内存进行回收前,第一件事情就是要确定这些对象有哪些还存活着,哪些已经死去(即不可能再被任何途径使用的对象)。
在主流的商业程序语言中,Java和c#等都是使用根搜索算法(GC Roots Tracing)判定对象是否存活的。这个算法的基本思路就是通过一系列的名为“GC Roots”的对象作为起始点,从这些节点开始向下搜索,搜索所走过...
分类:
编程语言 时间:
2015-08-18 14:14:08
阅读次数:
189
Digital Roots
Problem Description
The digital root of a positive integer is found by summing the digits of the integer. If the resulting value is a single digit then that digit is the digital ...
分类:
其他好文 时间:
2015-08-16 18:22:31
阅读次数:
85