摘要: A number that will be the same when it is written forwards or backwards is known as a Palindromic Number. For example, 1234321 is a palindromic number... 阅读全文
posted @ 2015-02-27 22:41 Joilee 阅读(182) 评论(0) 推荐(0) 编辑
摘要: Notice that the number 123456789 is a 9-digit number consisting exactly the numbers from 1 to 9, with no duplication. Double it we will obtain 2469135... 阅读全文
posted @ 2015-02-27 19:44 Joilee 阅读(149) 评论(0) 推荐(0) 编辑
摘要: 本题要求计算A/B,其中A是不超过1000位的正整数,B是1位正整数。你需要输出商数Q和余数R,使得A = B * Q + R成立。输入格式:输入在1行中依次给出A和B,中间以1空格分隔。输出格式:在1行中依次输出Q和R,中间以1空格分隔。输入样例:123456789050987654321 7输出... 阅读全文
posted @ 2015-02-27 18:49 Joilee 阅读(170) 评论(0) 推荐(0) 编辑
摘要: Given any positive integer N, you are supposed to find all of its prime factors, and write them in the format N = p1^k1* p2^k2*…*pm^km.Input Specifica... 阅读全文
posted @ 2015-02-27 16:10 Joilee 阅读(223) 评论(0) 推荐(0) 编辑
摘要: 令Pi表示第i个素数。现任给两个正整数M 2 #include 3 #include 4 #include 5 #include 6 #include 7 #include 8 using namespace std; 9 10 11 const int maxn=1000000;12... 阅读全文
posted @ 2015-02-27 10:01 Joilee 阅读(206) 评论(0) 推荐(0) 编辑