摘要: Pseudoprime numbersTime Limit: 1000MSMemory Limit: 65536KTotal Submissions: 6044Accepted: 2421DescriptionFermat'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 ve 阅读全文
posted @ 2014-03-10 20:55 hyx1 阅读(219) 评论(0) 推荐(0) 编辑
摘要: Semi-prime H-numbersTime Limit: 1000MSMemory Limit: 65536KTotal Submissions: 7059Accepted: 3030DescriptionThis problem is based on an exercise of David Hilbert, who pedagogically suggested that one study the theory of 4n+1 numbers. Here, we do only a bit of that.An H-number is a positive number whic 阅读全文
posted @ 2014-03-10 20:29 hyx1 阅读(377) 评论(0) 推荐(0) 编辑
摘要: X-factor ChainsTime Limit: 1000MSMemory Limit: 65536KTotal Submissions: 5111Accepted: 1622DescriptionGiven a positive integer X, an X-factor chain of length m is a sequence of integers,1 = X0, X1, X2, …, Xm = XsatisfyingXi 2 #include 3 #include 4 #include 5 6 using namespace std; 7 8 #define m... 阅读全文
posted @ 2014-03-10 19:58 hyx1 阅读(490) 评论(0) 推荐(0) 编辑
摘要: Prime PathTime Limit: 1000MSMemory Limit: 65536KTotal Submissions: 10320Accepted: 5897DescriptionThe ministers of the cabinet were quite upset by the message from the Chief of Security stating that they would all have to change the four-digit room numbers on their offices. — It is a matter of securi 阅读全文
posted @ 2014-03-10 18:53 hyx1 阅读(157) 评论(0) 推荐(0) 编辑