摘要:
2^x mod n = 1Time Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 7004Accepted Submission(s): 2106Problem DescriptionGive a number n, find the minimum x(x>0) that satisfies 2^x mod n = 1.InputOne positive integer on each line, the value of n.OutputIf 阅读全文
posted @ 2012-09-14 23:38
可笑痴狂
阅读(983)
评论(0)
推荐(0)
摘要:
R(N)Time Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 1412Accepted Submission(s): 729Problem DescriptionWe know that some positive integer x can be expressed as x=A^2+B^2(A,B are integers). Take x=10 for example, 10=(-3)^2+1^2.We define R(N) (N is po 阅读全文
posted @ 2012-09-14 22:37
可笑痴狂
阅读(385)
评论(0)
推荐(0)
摘要:
string类的小结C++ string资料一之所以抛弃char*的字符串而选用C++标准程序库中的string类,是因为他和前者比较起来,不必担心内存是否足够、字符串长度等等,而且作为一个类出现,他集成的操作函数足以完成我们大多数情况下(甚至是100%)的需要。我们可以用 = 进行赋值操作,== 进行比较,+ 做串联(是不是很简单?)。我们尽可以把它看成是C++的基本数据类型。首先,为了在我们的程序中使用string类型,我们必须包含头文件 <string>。如下:#include <string> //注意这里不是string.h。string.h是C字符串头文件1 阅读全文
posted @ 2012-09-14 16:11
可笑痴狂
阅读(2854)
评论(0)
推荐(0)
摘要:
A Simple ProblemTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65535/32768 K (Java/Others)Total Submission(s): 1959Accepted Submission(s): 518Problem DescriptionFor a given positive integer n, please find the smallest positive integer x that we can find an integer y such that y^2 = n +x^2.Input 阅读全文
posted @ 2012-09-14 12:48
可笑痴狂
阅读(838)
评论(0)
推荐(0)